Skip to content

Commit fc47dc9

Browse files
committed
Call onDispose
1 parent 7618c15 commit fc47dc9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/plugins/hive/tests/hive.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ import useMeshHive from '../src';
33
describe('Hive', () => {
44
it('does not hook into Node.js process', () => {
55
const spy = jest.spyOn(process, 'once');
6-
useMeshHive({
6+
const plugin = useMeshHive({
77
enabled: true,
88
token: 'FAKE_TOKEN',
9-
}).onPluginInit?.({
9+
});
10+
plugin.onPluginInit?.({
1011
addPlugin: jest.fn(),
1112
plugins: [],
1213
setSchema: jest.fn(),
1314
registerContextErrorHandler: jest.fn(),
1415
});
1516
expect(spy).not.toHaveBeenCalled();
17+
// @ts-expect-error - ignore
18+
return plugin.onDispose();
1619
});
1720
});

0 commit comments

Comments
 (0)