Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source map spec tests to latest #512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading