Skip to content

Commit

Permalink
Fix snaps-execution-environment test type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Jul 15, 2024
1 parent 92a7d26 commit 151b872
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -59,5 +59,5 @@ export function getMockedStreamProvider() {
return await withTeardown(originalRequest(args), { lastTeardown: 0 });
};

return proxyStreamProvider(provider, request);
return proxyStreamProvider(request);
}

0 comments on commit 151b872

Please sign in to comment.