Skip to content

Commit

Permalink
Update spec tests to latest
Browse files Browse the repository at this point in the history
  * Update how line mapping in test harness is done for null entries
  * Update some skipped tests
  • Loading branch information
takikawa committed Oct 1, 2024
1 parent 3cb92cc commit b60b4df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/source-map-tests
Submodule source-map-tests updated 66 files
+14 −0 LICENSE.md
+33 −137 README.md
+2,036 −239 chrome/0001-Add-source-map-specification-tests.patch
+46 −0 chrome/0002-Add-reverse-mapping-code-to-test.patch
+0 −59 chrome/0002-add-test-for-valid-sourcemaps.patch
+0 −108 chrome/0003-add-more-tests-cases.patch
+0 −337 firefox/0001-WIP-Firefox-source-map-spec-tests.patch
+0 −71 firefox/browser_spec-source-map.js
+1 −0 resources/basic-mapping-as-index-map.js.map
+1 −0 resources/file-not-a-string-1.js
+8 −0 resources/file-not-a-string-1.js.map
+1 −0 resources/file-not-a-string-2.js
+8 −0 resources/file-not-a-string-2.js.map
+1 −0 resources/ignore-list-out-of-bounds-1.js
+0 −0 resources/ignore-list-out-of-bounds-1.js.map
+1 −0 resources/ignore-list-out-of-bounds-2.js
+8 −0 resources/ignore-list-out-of-bounds-2.js.map
+0 −1 resources/ignore-list-out-of-bounds.js
+1 −1 resources/ignore-list-wrong-type-3.js.map
+1 −0 resources/ignore-list-wrong-type-4.js
+8 −0 resources/ignore-list-wrong-type-4.js.map
+1 −0 resources/index-map-empty-sections.js
+4 −0 resources/index-map-empty-sections.js.map
+2 −0 resources/index-map-file-wrong-type-1.js
+15 −0 resources/index-map-file-wrong-type-1.js.map
+2 −0 resources/index-map-file-wrong-type-2.js
+15 −0 resources/index-map-file-wrong-type-2.js.map
+1 −0 resources/index-map-invalid-sub-map.js
+13 −0 resources/index-map-invalid-sub-map.js.map
+2 −0 resources/index-map-missing-file.js
+14 −0 resources/index-map-missing-file.js.map
+1 −0 resources/index-map-two-concatenated-sources.js.map
+1 −0 resources/invalid-vlq-non-base64-char-padding.js
+7 −0 resources/invalid-vlq-non-base64-char-padding.js.map
+3 −0 resources/mapping-semantics-column-reset.js
+7 −0 resources/mapping-semantics-column-reset.js.map
+2 −0 resources/mapping-semantics-five-field-segment.js
+7 −0 resources/mapping-semantics-five-field-segment.js.map
+2 −0 resources/mapping-semantics-four-field-segment.js
+7 −0 resources/mapping-semantics-four-field-segment.js.map
+2 −0 resources/mapping-semantics-relative-1.js
+7 −0 resources/mapping-semantics-relative-1.js.map
+3 −0 resources/mapping-semantics-relative-2.js
+7 −0 resources/mapping-semantics-relative-2.js.map
+2 −0 resources/mapping-semantics-single-field-segment.js
+7 −0 resources/mapping-semantics-single-field-segment.js.map
+1 −0 resources/names-missing.js.map
+2 −0 resources/source-resolution-absolute-url.js
+8 −0 resources/source-resolution-absolute-url.js.map
+1 −0 resources/source-root-not-a-string-1.js
+8 −0 resources/source-root-not-a-string-1.js.map
+1 −0 resources/source-root-not-a-string-2.js
+8 −0 resources/source-root-not-a-string-2.js.map
+2 −0 resources/source-root-resolution.js
+9 −0 resources/source-root-resolution.js.map
+1 −0 resources/valid-mapping-empty-string.js
+8 −0 resources/valid-mapping-empty-string.js.map
+2 −0 resources/vlq-valid-continuation-bit-present-1.js
+7 −0 resources/vlq-valid-continuation-bit-present-1.js.map
+4 −0 resources/vlq-valid-continuation-bit-present-2.js
+7 −0 resources/vlq-valid-continuation-bit-present-2.js.map
+4 −0 resources/vlq-valid-negative-digit.js
+7 −0 resources/vlq-valid-negative-digit.js.map
+2 −0 resources/vlq-valid-single-digit.js
+7 −0 resources/vlq-valid-single-digit.js.map
+486 −6 source-map-spec-tests.json
11 changes: 9 additions & 2 deletions test/test-spec-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ const skippedTests = [
"ignoreListWrongType1",
"ignoreListWrongType2",
"ignoreListWrongType3",
"ignoreListOutOfBounds",
"ignoreListWrongType4",
"ignoreListOutOfBounds1",
"ignoreListOutOfBounds2",
// These 'file' checks aren't currently done
"fileNotAString1",
"fileNotAString2",
"indexMapFileWrongType1",
"indexMapFileWrongType2",
];

// The source-map library converts null sources to the "null" URL in its
Expand All @@ -62,7 +69,7 @@ function nullish(nullOrString) {
}

function mapLine(line) {
return line + 1;
return line === null ? null : line + 1;
}

async function testMappingAction(assert, rawSourceMap, action) {
Expand Down

0 comments on commit b60b4df

Please sign in to comment.