diff --git a/spec/support/ds4rolls.spec.ts b/spec/support/ds4rolls.spec.ts index 282855a8..b8768e80 100644 --- a/spec/support/ds4rolls.spec.ts +++ b/spec/support/ds4rolls.spec.ts @@ -197,6 +197,22 @@ describe("DS4 Rools with multiple dice and no modifiers.", () => { new RollResult(40, RollResultStatus.SUCCESS, [1, 20, 15]), ); }); + + it("Should properly maximize throw result with all dice success.", () => { + const rollProvider = mockMultipleThrows([15, 4, 12]); + + expect(rollCheckMultipleDice(46, {}, rollProvider)).toEqual( + new RollResult(31, RollResultStatus.SUCCESS, [15, 12, 4]), + ); + }); + + it("Should properly maximize throw result with one dice a failure.", () => { + const rollProvider = mockMultipleThrows([15, 8, 20]); + + expect(rollCheckMultipleDice(46, {}, rollProvider)).toEqual( + new RollResult(35, RollResultStatus.SUCCESS, [20, 15, 8]), + ); + }); }); describe("DS4 Rools with multiple dice and min/max modifiers.", () => {