Skip to content

Commit

Permalink
add @ts-ignore
Browse files Browse the repository at this point in the history
prevents entire mock of `obj` now that it is typed
  • Loading branch information
allmtz committed Jul 28, 2023
1 parent 3bd2c34 commit fc2e70a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/__tests__/creature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ describe('Creature', () => {
beforeEach(() => (game = getGameMock()));

test('"materialized" creatures are automatically assigned separate ids', () => {
// @ts-ignore
const creature0 = new Creature(getCreatureObjMock(), game);
// @ts-ignore
const creature1 = new Creature(getCreatureObjMock(), game);
expect(creature0).toBeDefined();
expect(creature1).toBeDefined();
Expand All @@ -22,8 +24,10 @@ describe('Creature', () => {
test('a "materialized" (not temp) creature will reuse an existing, matching "unmaterialized" creature id', () => {
const obj = getCreatureObjMock();
obj.temp = true;
// @ts-ignore
const creatureTemp = new Creature(obj, game);
obj.temp = false;
// @ts-ignore
const creatureNotTemp = new Creature(obj, game);
expect(creatureTemp.id).toBe(creatureNotTemp.id);
});
Expand Down

0 comments on commit fc2e70a

Please sign in to comment.