2020-12-30 21:50:12 +01:00
|
|
|
import { rollCheckSingleDie, RollOptions, RollResult, RollResultStatus } from "../../src/module/rolls/roll-executor";
|
|
|
|
import { RollProvider } from "../../src/module/rolls/roll-provider";
|
2020-12-30 21:27:41 +01:00
|
|
|
|
|
|
|
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]),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|