aboutsummaryrefslogtreecommitdiff
path: root/test/cli/run/require-cache-fixture-b.cjs
blob: 525d5b3db3e96308e2b3803b008e6ec78c256208 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
exports.foo = 123;
exports.bar = 456;
exports.baz = 789;

if (require.main === module) {
  console.error(__filename, module.id);
  throw new Error("require.main === module");
}

if (module.parent == null || typeof module.parent !== "object") {
  console.error(module.parent);
  throw new Error("module.parent == null");
}

module.exports = { x: module.parent };