Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Jul 19, 2021
1 parent 8db36a4 commit 36c3b79
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const classes = {
'makeCurrent','destroy','iconify','restore','hide','show',
],
destroy(instance) {
instance.destroy();
if (instance) {
instance.destroy();
}
},
},

Expand All @@ -38,7 +40,9 @@ const classes = {
'addEventListener','removeEventListener','requestAnimationFrame',
],
destroy(instance) {
instance.destroy();
if (instance) {
instance.destroy();
}
},
},

Expand Down Expand Up @@ -69,14 +73,13 @@ describe('GLFW', () => {
});

afterAll(() => {
current.destroy();
current.destroy(instance);
});

it('can be created', () => {
expect(instance).toBeInstanceOf(glfw[c]);
});


current.props.forEach(prop => {
it(`#${prop} property exposed`, () => {
expect(instance).toHaveProperty(prop);
Expand Down

0 comments on commit 36c3b79

Please sign in to comment.