* reformatting of skill checks table

* Including own Random "generator", more refactoring
This commit is contained in:
2021-04-22 17:36:10 +02:00
committed by GitHub
parent cc8387256a
commit 126dce828d
14 changed files with 127 additions and 208 deletions

View File

@ -1,14 +1,8 @@
const {
roll
} = require('../../functions/Roll');
const { roll } = require('@dsabot/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),
);
test.each(expected)('contains only numbers from 1 to 6', (value) => {
expect(roll(200, 6).dice).toContain(value);
});
});
//todo: return sum
});