Skip to content

Commit

Permalink
test: add failing test for module.createRequire resolution
Browse files Browse the repository at this point in the history
Issue: #430
  • Loading branch information
maxam2017 committed Dec 25, 2024
1 parent 5777c8b commit 11ff792
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unit/module-create-require/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as module from 'node:module';

const req = module.createRequire(import.meta.url);
const lib = req('./lib.node');
1 change: 1 addition & 0 deletions test/unit/module-create-require/lib.node
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Native module for testing
5 changes: 5 additions & 0 deletions test/unit/module-create-require/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"package.json",
"test/unit/module-create-require/input.js",
"test/unit/module-create-require/lib.node"
]

0 comments on commit 11ff792

Please sign in to comment.