Source code

Revision control

Copy as Markdown

Other Tools

{
"importMap": {},
"importMapBaseURL": "https://example.com/app/index.html",
"tests": {
"valid relative specifiers": {
"expectedResults": {
"./foo/../bar": "https://example.com/js/bar",
"./foo/../../bar": "https://example.com/bar",
"../foo/bar": "https://example.com/foo/bar",
"../../../foo/bar": "https://example.com/foo/bar",
"/../../foo/bar": "https://example.com/foo/bar",
"/../foo/../bar": "https://example.com/bar"
}
},
"HTTPS scheme absolute URLs": {
"expectedResults": {
"https:fetch-scheme.org": "https://fetch-scheme.org/",
}
},
"valid relative URLs that are invalid as specifiers should fail": {
"expectedResults": {
"invalid-specifier": null,
"\\invalid-specifier": null,
":invalid-specifier": null,
"@invalid-specifier": null,
"%2E/invalid-specifier": null,
"%2E%2E/invalid-specifier": null,
".%2Finvalid-specifier": null
}
},
"invalid absolute URLs should fail": {
"expectedResults": {
}
},
"non-HTTPS fetch scheme absolute URLs": {
"expectedResults": {
"about:fetch-scheme": "about:fetch-scheme"
}
},
"non-fetch scheme absolute URLs": {
"expectedResults": {
"about:fetch-scheme": "about:fetch-scheme",
"mailto:non-fetch-scheme": "mailto:non-fetch-scheme",
"import:non-fetch-scheme": "import:non-fetch-scheme",
"javascript:non-fetch-scheme": "javascript:non-fetch-scheme",
"wss:non-fetch-scheme": "wss://non-fetch-scheme/"
}
}
}
}