diff options
Diffstat (limited to 'cli/tests')
4 files changed, 18 insertions, 1 deletions
diff --git a/cli/tests/testdata/npm/imports_package_json/main.js b/cli/tests/testdata/npm/imports_package_json/main.js index cd7bbf8e9..53090dd94 100644 --- a/cli/tests/testdata/npm/imports_package_json/main.js +++ b/cli/tests/testdata/npm/imports_package_json/main.js @@ -2,3 +2,6 @@ import data from "@denotest/imports-package-json"; console.log(data.hi); console.log(data.bye); +console.log(typeof data.fs.readFile); +console.log(typeof data.path.join); +console.log(typeof data.fs2.writeFile); diff --git a/cli/tests/testdata/npm/imports_package_json/main.out b/cli/tests/testdata/npm/imports_package_json/main.out index f006f18d5..9f702b96b 100644 --- a/cli/tests/testdata/npm/imports_package_json/main.out +++ b/cli/tests/testdata/npm/imports_package_json/main.out @@ -2,3 +2,6 @@ Download http://localhost:4545/npm/registry/@denotest/imports-package-json Download http://localhost:4545/npm/registry/@denotest/imports-package-json/1.0.0.tgz hi bye +function +function +function diff --git a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js index 46625479e..9e7c247b7 100644 --- a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js +++ b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js @@ -1,7 +1,13 @@ import hi from "#hi"; import bye from "./sub_path/main.js"; +import fs from "#fs"; +import path from "#path"; +import fs2 from "#fs2"; export default { hi, bye, + fs, + path, + fs2, }; diff --git a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json index a4fbc8889..2c294e680 100644 --- a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json +++ b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json @@ -11,6 +11,11 @@ "./sub-path-import-not-defined": "./sub_path/import_not_defined.js" }, "imports": { - "#hi": "./hi.js" + "#hi": "./hi.js", + "#fs": "fs", + "#path": "node:path", + "#fs2": { + "node": "fs" + } } } |