summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/check/node_builtin_modules/mod.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-01-24 15:05:54 +0100
committerGitHub <noreply@github.com>2023-01-24 09:05:54 -0500
commitfc2e00152b162280e78b06028d51274e33275629 (patch)
treeee567a99cabc6633454de231939f7d898146f1d8 /cli/tests/testdata/check/node_builtin_modules/mod.ts
parentcadeaae045d2489fe125286b8c2c641c6d973c3f (diff)
feat: support node built-in module imports (#17264)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/testdata/check/node_builtin_modules/mod.ts')
-rw-r--r--cli/tests/testdata/check/node_builtin_modules/mod.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/node_builtin_modules/mod.ts b/cli/tests/testdata/check/node_builtin_modules/mod.ts
new file mode 100644
index 000000000..0e62353fe
--- /dev/null
+++ b/cli/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;