Fix tests
This commit is contained in:
parent
1099b1500e
commit
c46c2c4a0a
1 changed files with 17 additions and 1 deletions
|
@ -5,7 +5,23 @@
|
||||||
|
|
||||||
import evaluateCheck from "../../src/module/rolls/check-evaluation";
|
import evaluateCheck from "../../src/module/rolls/check-evaluation";
|
||||||
|
|
||||||
Object.defineProperty(globalThis, "game", { value: { i18n: { localize: (key: string) => key } } });
|
class StubGame {
|
||||||
|
constructor() {
|
||||||
|
this.i18n = {
|
||||||
|
localize: (a: string) => a,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
i18n: {
|
||||||
|
localize: (a: string) => string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const game = new StubGame();
|
||||||
|
|
||||||
|
Object.defineProperties(globalThis, {
|
||||||
|
game: { value: game },
|
||||||
|
Game: { value: StubGame },
|
||||||
|
});
|
||||||
|
|
||||||
describe("evaluateCheck with no dice", () => {
|
describe("evaluateCheck with no dice", () => {
|
||||||
it("should throw an error.", () => {
|
it("should throw an error.", () => {
|
||||||
|
|
Loading…
Reference in a new issue