diff --git a/packages/snaps-execution-environments/src/common/endowments/endowments.test.browser.ts b/packages/snaps-execution-environments/src/common/endowments/endowments.test.browser.ts index 888ce0070d..e84ec6b3cf 100644 --- a/packages/snaps-execution-environments/src/common/endowments/endowments.test.browser.ts +++ b/packages/snaps-execution-environments/src/common/endowments/endowments.test.browser.ts @@ -33,8 +33,8 @@ lockdown({ globalThis.atob = harden(originalAtob); globalThis.btoa = harden(originalBtoa); -const mockNotify = () => { - // no-op +const mockNotify = async () => { + return Promise.resolve(); }; describe('endowments', () => { @@ -150,8 +150,6 @@ describe('endowments', () => { }, AbortSignal: { endowments: { AbortSignal }, - // @ts-expect-error - `abort()` method exists in browser, but not in - // Node.js. factory: () => AbortSignal.abort(), }, DateAttenuated: { diff --git a/packages/snaps-execution-environments/src/common/lockdown/lockdown-events.test.browser.ts b/packages/snaps-execution-environments/src/common/lockdown/lockdown-events.test.browser.ts index b94bcbfe5c..14087bffb4 100644 --- a/packages/snaps-execution-environments/src/common/lockdown/lockdown-events.test.browser.ts +++ b/packages/snaps-execution-environments/src/common/lockdown/lockdown-events.test.browser.ts @@ -1,10 +1,8 @@ -// eslint-disable-next-line import/unambiguous -import { expect } from '@wdio/globals'; - import { executeLockdownEvents } from './lockdown-events'; describe('lockdown events security', () => { it('should lockdown events and made event properties inaccessible', async () => { + const { expect } = await import('@wdio/globals'); executeLockdownEvents(); const eventTarget = new EventTarget(); diff --git a/packages/snaps-execution-environments/src/common/test-utils/endowments.ts b/packages/snaps-execution-environments/src/common/test-utils/endowments.ts index 80e4233f53..60a0b35402 100644 --- a/packages/snaps-execution-environments/src/common/test-utils/endowments.ts +++ b/packages/snaps-execution-environments/src/common/test-utils/endowments.ts @@ -2,8 +2,8 @@ import { walk } from '@lavamoat/lavatube'; import { createIdRemapMiddleware } from '@metamask/json-rpc-engine'; import ObjectMultiplex from '@metamask/object-multiplex'; -import { StreamProvider } from '@metamask/providers'; import type { RequestArguments } from '@metamask/providers'; +import { StreamProvider } from '@metamask/providers'; import { SNAP_STREAM_NAMES } from '@metamask/snaps-utils'; import { @@ -59,5 +59,5 @@ export function getMockedStreamProvider() { return await withTeardown(originalRequest(args), { lastTeardown: 0 }); }; - return proxyStreamProvider(provider, request); + return proxyStreamProvider(request); }