Skip to content

Commit

Permalink
avoid globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Jan 19, 2024
1 parent 8507136 commit f070605
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ describe("systemjs exec", function () {
);
let ret;

globalThis.require = require;
globalThis.System = {
const System = {
register: function (_, module) {
ret = module().execute();
},
};
eval(content);

expect(ret).toBe("done");
expect((require, System, ret)).toBe("done");
});
});

0 comments on commit f070605

Please sign in to comment.