diff options
Diffstat (limited to '__tests__/dice.test.js')
-rw-r--r-- | __tests__/dice.test.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/__tests__/dice.test.js b/__tests__/dice.test.js index caba0a9..4e89031 100644 --- a/__tests__/dice.test.js +++ b/__tests__/dice.test.js @@ -4,6 +4,7 @@ const { d, add, subtract, + multiply, bonusAdd, bonusSubtract, negative, @@ -316,6 +317,28 @@ describe('subtract', () => { }) }) +describe('multiply', () => { + describe('1d6 * 3', () => { + const die = multiply(d(constant(1), constant(6)), constant(3)) + testDie(die, { + diceCount: 1, + average: { + average: 10.5 + }, + variance: { + variance: 26.25 + }, + bounds: { + low: 3, + high: 18, + expectLow: true, + expectHigh: true + } + }) + }) +}) + + describe('bonusAdd', () => { describe('1d20+3', () => { const die = bonusAdd(d(constant(1), constant(20)), constant(3)) |