Skip to content

Commit 1f2557c

Browse files
committed
test(world): improve error message regex for component retrieval
1 parent 1668b85 commit 1f2557c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/world.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe("World", () => {
7979
world.delete(entity, positionComponent);
8080
world.sync();
8181
expect(world.has(entity, positionComponent)).toBe(false);
82-
expect(() => world.get(entity, positionComponent)).toThrow(`Component type 22 is not in this archetype`);
82+
expect(() => world.get(entity, positionComponent)).toThrow(/^Component type \d+ is not in this archetype$/);
8383
});
8484

8585
it("should throw error when removing invalid component type", () => {

0 commit comments

Comments
 (0)