empty-import-map.json (2214B)
1 { 2 "importMap": {}, 3 "importMapBaseURL": "https://example.com/app/index.html", 4 "baseURL": "https://example.com/js/app.mjs", 5 "tests": { 6 "valid relative specifiers": { 7 "expectedResults": { 8 "./foo": "https://example.com/js/foo", 9 "./foo/bar": "https://example.com/js/foo/bar", 10 "./foo/../bar": "https://example.com/js/bar", 11 "./foo/../../bar": "https://example.com/bar", 12 "../foo": "https://example.com/foo", 13 "../foo/bar": "https://example.com/foo/bar", 14 "../../../foo/bar": "https://example.com/foo/bar", 15 "/foo": "https://example.com/foo", 16 "/foo/bar": "https://example.com/foo/bar", 17 "/../../foo/bar": "https://example.com/foo/bar", 18 "/../foo/../bar": "https://example.com/bar" 19 } 20 }, 21 "HTTPS scheme absolute URLs": { 22 "expectedResults": { 23 "https://fetch-scheme.net": "https://fetch-scheme.net/", 24 "https:fetch-scheme.org": "https://fetch-scheme.org/", 25 "https://fetch%2Dscheme.com/": "https://fetch-scheme.com/", 26 "https://///fetch-scheme.com///": "https://fetch-scheme.com///" 27 } 28 }, 29 "valid relative URLs that are invalid as specifiers should fail": { 30 "expectedResults": { 31 "invalid-specifier": null, 32 "\\invalid-specifier": null, 33 ":invalid-specifier": null, 34 "@invalid-specifier": null, 35 "%2E/invalid-specifier": null, 36 "%2E%2E/invalid-specifier": null, 37 ".%2Finvalid-specifier": null 38 } 39 }, 40 "invalid absolute URLs should fail": { 41 "expectedResults": { 42 "https://invalid-url.com:demo": null, 43 "http://[invalid-url.com]/": null 44 } 45 }, 46 "non-HTTPS fetch scheme absolute URLs": { 47 "expectedResults": { 48 "about:fetch-scheme": "about:fetch-scheme" 49 } 50 }, 51 "non-fetch scheme absolute URLs": { 52 "expectedResults": { 53 "about:fetch-scheme": "about:fetch-scheme", 54 "mailto:non-fetch-scheme": "mailto:non-fetch-scheme", 55 "import:non-fetch-scheme": "import:non-fetch-scheme", 56 "javascript:non-fetch-scheme": "javascript:non-fetch-scheme", 57 "wss:non-fetch-scheme": "wss://non-fetch-scheme/" 58 } 59 } 60 } 61 }