jest throws no errors
This commit is contained in:
@ -1,10 +1,14 @@
|
||||
const Roll = require('@dsabot/Roll');
|
||||
const {
|
||||
roll
|
||||
} = require('../../functions/Roll');
|
||||
|
||||
describe('Beware of a misunderstanding! A sequence of dice rolls', () => {
|
||||
const expected = [1,2,3,4,5,6];
|
||||
it('matches even with an unexpected number 7', () => {
|
||||
expect(Roll(1,6)).not.toEqual(
|
||||
describe('rolling dice', () => {
|
||||
const expected = [1, 2, 3, 4, 5, 6];
|
||||
it('contain only numbers from 1 to 6', () => {
|
||||
expect(roll(100, 6).dice).toEqual(
|
||||
expect.arrayContaining(expected),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//todo: return sum
|
Reference in New Issue
Block a user