summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/import_map
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-08-20 11:31:33 -0400
committerGitHub <noreply@github.com>2022-08-20 11:31:33 -0400
commit87f80ff6be5e2a132b583a9c380fff5db3cb2b07 (patch)
treeb2c43c9004b9ada204f3b5db7c221fa6322f026a /cli/tests/testdata/npm/import_map
parent1ffbd561642d05a05e18ada764d50581dea779ef (diff)
feat(unstable): initial support for npm specifiers (#15484)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tests/testdata/npm/import_map')
-rw-r--r--cli/tests/testdata/npm/import_map/import_map.json5
-rw-r--r--cli/tests/testdata/npm/import_map/main.js7
-rw-r--r--cli/tests/testdata/npm/import_map/main.out2
3 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/import_map/import_map.json b/cli/tests/testdata/npm/import_map/import_map.json
new file mode 100644
index 000000000..a7ed13b82
--- /dev/null
+++ b/cli/tests/testdata/npm/import_map/import_map.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "chalk": "npm:chalk@5"
+ }
+}
diff --git a/cli/tests/testdata/npm/import_map/main.js b/cli/tests/testdata/npm/import_map/main.js
new file mode 100644
index 000000000..fe7ef549a
--- /dev/null
+++ b/cli/tests/testdata/npm/import_map/main.js
@@ -0,0 +1,7 @@
+import chalk from "chalk";
+
+console.log(chalk.green("chalk import map loads"));
+
+export function test(value) {
+ return chalk.red(value);
+}
diff --git a/cli/tests/testdata/npm/import_map/main.out b/cli/tests/testdata/npm/import_map/main.out
new file mode 100644
index 000000000..755eb7338
--- /dev/null
+++ b/cli/tests/testdata/npm/import_map/main.out
@@ -0,0 +1,2 @@
+Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
+chalk import map loads