Skip to content

Commit

Permalink
fix(xsnap): work around stricter TS checking of globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Sep 25, 2021
1 parent d03c138 commit 942ae90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/xsnap/src/avaAssertXS.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/** global print */

const { freeze, keys } = Object;
const { assign, freeze, keys } = Object;

/**
* deep equal value comparison
Expand Down Expand Up @@ -329,7 +329,7 @@ function makeTester(htest, out) {
* @param {(t: Tester) => Promise<void>} run
* @param {Harness?} htestOpt
*/
function test(label, run, htestOpt) {
const test = (label, run, htestOpt) => {
const htest = htestOpt || theHarness;
if (!htest) throw Error('no harness');

Expand All @@ -345,7 +345,7 @@ function test(label, run, htestOpt) {
t.fail(`${label} threw: ${ex.message}`);
}
});
}
};

test.createHarness = createHarness;

Expand All @@ -368,4 +368,4 @@ freeze(test);

// export default test;
// export { test };
globalThis.test = test;
assign(globalThis, { test });

0 comments on commit 942ae90

Please sign in to comment.