summaryrefslogtreecommitdiff
path: root/tests/testdata/check/node_builtin_modules/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/check/node_builtin_modules/mod.ts')
-rw-r--r--tests/testdata/check/node_builtin_modules/mod.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/testdata/check/node_builtin_modules/mod.ts b/tests/testdata/check/node_builtin_modules/mod.ts
new file mode 100644
index 000000000..0e62353fe
--- /dev/null
+++ b/tests/testdata/check/node_builtin_modules/mod.ts
@@ -0,0 +1,9 @@
+import fs from "node:fs";
+const _data = fs.readFileSync("./node_builtin.js", 123);
+
+// check node:module specifically because for deno check it should
+// resolve to the @types/node package, but at runtime it uses a different
+// builtin object than deno_std
+import { builtinModules } from "node:module";
+// should error about being string[]
+const _testString: number[] = builtinModules;