20 lines
590 B
TypeScript
20 lines
590 B
TypeScript
|
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]),
|
||
|
);
|
||
|
});
|
||
|
});
|