remake world and components on each test
This commit is contained in:
parent
6b3539e3c8
commit
7bbc6008f5
1 changed files with 2 additions and 2 deletions
|
@ -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 { addComponent, addEntity, createWorld, defineComponent, Types } from 'bitecs'
|
||||||
import assert from './assert.js'
|
import assert from './assert.js'
|
||||||
import { query } from '../src/query.js'
|
import { query } from '../src/query.js'
|
||||||
|
|
||||||
let engine = {}
|
let engine = {}
|
||||||
describe('query', () => {
|
describe('query', () => {
|
||||||
before(() => {
|
beforeEach(() => {
|
||||||
const world = { default: createWorld() }
|
const world = { default: createWorld() }
|
||||||
const component = {
|
const component = {
|
||||||
Player: defineComponent(null, 10),
|
Player: defineComponent(null, 10),
|
||||||
|
|
Loading…
Reference in a new issue