diff options
Diffstat (limited to 'cli/tests/testdata')
5 files changed, 36 insertions, 0 deletions
diff --git a/cli/tests/testdata/import_maps/config.json b/cli/tests/testdata/import_maps/config.json new file mode 100644 index 000000000..b296a63c7 --- /dev/null +++ b/cli/tests/testdata/import_maps/config.json @@ -0,0 +1,15 @@ +{ + "importMap": "./import_map.json", + "imports": { + "moment": "./moment/moment.ts", + "moment/": "./moment/", + "lodash": "./lodash/lodash.ts", + "lodash/": "./lodash/", + "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts" + }, + "scopes": { + "scope/": { + "moment": "./scoped_moment.ts" + } + } +} diff --git a/cli/tests/testdata/import_maps/import_map_invalid.json b/cli/tests/testdata/import_maps/import_map_invalid.json new file mode 100644 index 000000000..a09d280c5 --- /dev/null +++ b/cli/tests/testdata/import_maps/import_map_invalid.json @@ -0,0 +1,7 @@ +{ + "imports": { + "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts" + }, + "scopes": { + } +} diff --git a/cli/tests/testdata/lsp/deno.embedded_import_map.jsonc b/cli/tests/testdata/lsp/deno.embedded_import_map.jsonc new file mode 100644 index 000000000..75d5d0849 --- /dev/null +++ b/cli/tests/testdata/lsp/deno.embedded_import_map.jsonc @@ -0,0 +1,5 @@ +{ + "imports": { + "/~/": "./lib/" + } +} diff --git a/cli/tests/testdata/run/033_import_map_in_config_file.out b/cli/tests/testdata/run/033_import_map_in_config_file.out new file mode 100644 index 000000000..72df124a2 --- /dev/null +++ b/cli/tests/testdata/run/033_import_map_in_config_file.out @@ -0,0 +1,8 @@ +Warning "importMap" setting is ignored when "imports" or "scopes" are specified in the config file. +Hello from remapped moment! +Hello from remapped moment dir! +Hello from remapped lodash! +Hello from remapped lodash dir! +Hello from remapped Vue! +Hello from scoped moment! +Hello from scoped! diff --git a/cli/tests/testdata/run/033_import_map_in_flag_has_precedence.out b/cli/tests/testdata/run/033_import_map_in_flag_has_precedence.out new file mode 100644 index 000000000..e9b183ee6 --- /dev/null +++ b/cli/tests/testdata/run/033_import_map_in_flag_has_precedence.out @@ -0,0 +1 @@ +error: Relative import path [WILDCARD] not prefixed with / or ./ or ../ and not in import map [WILDCARD] |