Skip to content

Commit

Permalink
Implement nsObj helper from webpack tests and pass basic import test (v…
Browse files Browse the repository at this point in the history
  • Loading branch information
wbinnssmith committed Oct 26, 2022
1 parent 770d9f0 commit 039e440
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/next-dev/tests/harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ globalThis.__jest__ = jest;
globalThis.expect = expect;
globalThis.describe = jest.describe;
globalThis.it = jest.it;

// From https://github.com/webpack/webpack/blob/9fcaa243573005d6fdece9a3f8d89a0e8b399613/test/TestCases.template.js#L422
globalThis.nsObj = function nsObj(obj) {
Object.defineProperty(obj, Symbol.toStringTag, {
value: "Module",
});
return obj;
};

0 comments on commit 039e440

Please sign in to comment.