diff options
author | 2023-09-28 03:53:24 -0700 | |
---|---|---|
committer | 2023-09-28 03:53:24 -0700 | |
commit | 387f1260c9dc0cea667b44ec0152fff0cd4def25 (patch) | |
tree | 24dde83cf812481b6d1c8de316a30ece7b745a54 /test/js/node/module/node-module-module.test.js | |
parent | e60b3607c12c91959ec795228cc299703d5b09d0 (diff) | |
download | bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.gz bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.zst bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.zip |
Get Next.js Pages Router to work (#6095)
* hell
* make it so bun-debug-src
* teag
* wild
* yippee
* fas
* fix async hooks assertions
* yap
* yeah that's wild
* aa
* a
* increase time allowed
* so trivial
Diffstat (limited to 'test/js/node/module/node-module-module.test.js')
-rw-r--r-- | test/js/node/module/node-module-module.test.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/js/node/module/node-module-module.test.js b/test/js/node/module/node-module-module.test.js index 26fbb6fab..5ac48d426 100644 --- a/test/js/node/module/node-module-module.test.js +++ b/test/js/node/module/node-module-module.test.js @@ -71,6 +71,17 @@ test("Overwriting _resolveFilename", () => { expect(exitCode).toBe(0); }); +test("Overwriting Module.prototype.require", () => { + const { stdout, exitCode } = Bun.spawnSync({ + cmd: [bunExe(), "run", path.join(import.meta.dir, "modulePrototypeOverwrite.cjs")], + env: bunEnv, + stderr: "inherit", + }); + + expect(stdout.toString().trim().endsWith("--pass--")).toBe(true); + expect(exitCode).toBe(0); +}); + test("Module.prototype._compile", () => { const module = new Module("module id goes here"); const starting_exports = module.exports; |