parsing-schema-toplevel.json (1947B)
1 { 2 "name": "Mismatching the top-level schema", 3 "importMapBaseURL": "https://base.example/", 4 "tests": { 5 "should throw for top-level non-objects": { 6 "expectedParsedImportMap": null, 7 "tests": { 8 "null": { 9 "importMap": null 10 }, 11 "boolean": { 12 "importMap": true 13 }, 14 "number": { 15 "importMap": 1 16 }, 17 "string": { 18 "importMap": "foo" 19 }, 20 "array": { 21 "importMap": [] 22 } 23 } 24 }, 25 "should throw if imports is a non-object": { 26 "expectedParsedImportMap": null, 27 "tests": { 28 "null": { 29 "importMap": { 30 "imports": null 31 } 32 }, 33 "boolean": { 34 "importMap": { 35 "imports": true 36 } 37 }, 38 "number": { 39 "importMap": { 40 "imports": 1 41 } 42 }, 43 "string": { 44 "importMap": { 45 "imports": "foo" 46 } 47 }, 48 "array": { 49 "importMap": { 50 "imports": [] 51 } 52 } 53 } 54 }, 55 "should throw if scopes is a non-object": { 56 "expectedParsedImportMap": null, 57 "tests": { 58 "null": { 59 "importMap": { 60 "scopes": null 61 } 62 }, 63 "boolean": { 64 "importMap": { 65 "scopes": true 66 } 67 }, 68 "number": { 69 "importMap": { 70 "scopes": 1 71 } 72 }, 73 "string": { 74 "importMap": { 75 "scopes": "foo" 76 } 77 }, 78 "array": { 79 "importMap": { 80 "scopes": [] 81 } 82 } 83 } 84 }, 85 "should ignore unspecified top-level entries": { 86 "importMap": { 87 "imports": {}, 88 "new-feature": {}, 89 "scops": {} 90 }, 91 "expectedParsedImportMap": { 92 "imports": {}, 93 "scopes": {} 94 } 95 } 96 } 97 }