Skip to content

Commit

Permalink
feat(core): fixed nodeOps remove test (this time correctly 😉)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinoooo committed Apr 6, 2023
1 parent 2706f48 commit f5fca28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/nodeOpts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ describe('nodeOps', () => {

it('remove: removes child from parent', async () => {
// Setup
const scene = new Scene() as unknown as TresObject
const mesh = new Mesh() as unknown as TresObject
const parent = new Scene() as unknown as TresObject
const child = new Mesh() as unknown as TresObject

nodeOps.insert(mesh, scene)
nodeOps.insert(child, parent)

// Test
nodeOps.remove(mesh)
nodeOps.remove(child)

// Assert
expect(!scene.children.length)
expect(!parent.children.includes(child)).toBeTruthy()
})

it('patchProp should patch property of node', async () => {
Expand Down

0 comments on commit f5fca28

Please sign in to comment.