Files
open-wc/packages/import-maps-resolve/test-node/json/tricky-specifiers.json
2020-10-25 08:46:32 +01:00

44 lines
1.4 KiB
JSON

{
"importMap": {
"imports": {
"package/withslash": "/node_modules/package-with-slash/index.mjs",
"not-a-package": "/lib/not-a-package.mjs",
"only-slash/": "/lib/only-slash/",
".": "/lib/dot.mjs",
"..": "/lib/dotdot.mjs",
"..\\": "/lib/dotdotbackslash.mjs",
"%2E": "/lib/percent2e.mjs",
"%2F": "/lib/percent2f.mjs"
}
},
"importMapBaseURL": "https://example.com/app/index.html",
"baseURL": "https://example.com/js/app.mjs",
"name": "Tricky specifiers",
"tests": {
"explicitly-mapped specifiers that happen to have a slash": {
"expectedResults": {
"package/withslash": "https://example.com/node_modules/package-with-slash/index.mjs"
}
},
"specifier with punctuation": {
"expectedResults": {
".": "https://example.com/lib/dot.mjs",
"..": "https://example.com/lib/dotdot.mjs",
"..\\": "https://example.com/lib/dotdotbackslash.mjs",
"%2E": "https://example.com/lib/percent2e.mjs",
"%2F": "https://example.com/lib/percent2f.mjs"
}
},
"submodule of something not declared with a trailing slash should fail": {
"expectedResults": {
"not-a-package/foo": null
}
},
"module for which only a trailing-slash version is present should fail": {
"expectedResults": {
"only-slash": null
}
}
}
}