Make tests and implementation interact.
This commit is contained in:
parent
7089178a0d
commit
e0b65ca061
7 changed files with 163 additions and 34 deletions
19
spec/support/ds4rolls.spec.ts
Normal file
19
spec/support/ds4rolls.spec.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import {
|
||||
rollCheckSingleDie,
|
||||
RollOptions,
|
||||
RollProvider,
|
||||
RollResult,
|
||||
RollResultStatus,
|
||||
} from "../../src/module/rolls/ds4rolls";
|
||||
|
||||
describe("DS4 Rolls", () => {
|
||||
it("Should do a proper single success role", () => {
|
||||
const rollProvider: RollProvider = jasmine.createSpyObj("rollProvider", ["getNextRoll"]);
|
||||
|
||||
rollProvider.getNextRoll = jasmine.createSpy("getNextRoll").and.returnValue(4);
|
||||
|
||||
expect(rollCheckSingleDie(12, new RollOptions(), rollProvider)).toEqual(
|
||||
new RollResult(4, RollResultStatus.SUCCESS, [4]),
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue