From 7bbc6008f5f4f8a4935a708dce9a44218fe11222 Mon Sep 17 00:00:00 2001 From: kitsunecafe Date: Wed, 20 Nov 2024 14:58:46 -0600 Subject: [PATCH] remake world and components on each test --- tests/query.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/query.test.js b/tests/query.test.js index 8885a4a..be2aaea 100644 --- a/tests/query.test.js +++ b/tests/query.test.js @@ -1,11 +1,11 @@ -import { before, describe, it } from 'node:test' +import { beforeEach, describe, it } from 'node:test' import { addComponent, addEntity, createWorld, defineComponent, Types } from 'bitecs' import assert from './assert.js' import { query } from '../src/query.js' let engine = {} describe('query', () => { - before(() => { + beforeEach(() => { const world = { default: createWorld() } const component = { Player: defineComponent(null, 10),