Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Sep 20, 2023
1 parent 1e1c294 commit 027279c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/snaps-execution-environments/coverage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"branches": 78.57,
"branches": 77.3,
"functions": 91.79,
"lines": 90.7,
"statements": 90.58
"lines": 90.77,
"statements": 90.64
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ lockdown({
globalThis.atob = harden(originalAtob);
globalThis.btoa = harden(originalBtoa);

const mockNotify = () => {
// no-op
};

describe('endowments', () => {
describe('hardening', () => {
const modules = buildCommonEndowments();
modules.forEach((endowment) => endowment.factory({ snapId: MOCK_SNAP_ID }));
modules.forEach((endowment) =>
endowment.factory({ snapId: MOCK_SNAP_ID, notify: mockNotify }),
);

// Specially attenuated endowments or endowments that require
// to be imported in a different way
Expand All @@ -56,9 +62,7 @@ describe('endowments', () => {
Headers: HeadersHardened,
Response: ResponseHardened,
} = network.factory({
notify: () => {
// no-op
},
notify: mockNotify,
});
const { Date: DateAttenuated } = date.factory();
const { console: consoleAttenuated } = consoleEndowment.factory({
Expand Down

0 comments on commit 027279c

Please sign in to comment.