Files
dsabot/__tests__/functions/Roll.js
2021-04-10 20:14:29 +02:00

14 lines
289 B
JavaScript

const {
roll
} = require('../../functions/Roll');
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