Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
david0xd committed Jan 26, 2023
1 parent 61832b5 commit 4841c50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/snaps-execution-environments/nyc.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module.exports = {
'check-coverage': true,
branches: 89.81,
lines: 90.37,
lines: 90.38,
functions: 94.31,
statements: 90.37,
statements: 90.38,
};
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const buildCommonEndowments = (): EndowmentFactory[] => {
names: [endowmentSpecification.name] as const,
factory: () => {
return {
[endowmentSpecification.name]: harden(endowmentSpecification),
[endowmentSpecification.name]: harden(
endowmentSpecification.endowment,
),
} as const;
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('Endowment utils', () => {
expect(endowments).toMatchObject({
snap: mockSnapAPI,
console,
Uint8Array: expect.any(Object),
Uint8Array: expect.any(Function),
Math: expect.any(Object),
setTimeout: expect.any(Function),
clearTimeout: expect.any(Function),
Expand All @@ -126,9 +126,9 @@ describe('Endowment utils', () => {

expect(endowments.snap).toBe(mockSnapAPI);
expect(endowments.console).toBe(console);
expect(endowments.Uint8Array).toBe(Uint8Array);
expect(endowments.WebAssembly).toBe(WebAssembly);

expect(endowments.Uint8Array).not.toBe(Uint8Array);
expect(endowments.WebAssembly).not.toBe(WebAssembly);
expect(endowments.clearTimeout).not.toBe(clearTimeout);
expect(endowments.setTimeout).not.toBe(setTimeout);
expect(endowments.Math).not.toBe(Math);
Expand Down

0 comments on commit 4841c50

Please sign in to comment.