remake world and components on each test

This commit is contained in:
Rowan 2024-11-20 14:58:46 -06:00
parent 6b3539e3c8
commit 7bbc6008f5

View file

@ -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),