Commit 45b0250
test_runner: account for newline in source maps
This commit updates the source mapping logic in the test runner
to account for newline characters that are not included in line
length calculations.
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Fixes: #54240
PR-URL: #54444
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>1 parent 336496b commit 45b0250Copy full SHA for 45b0250
5 files changed
+175-2Lines changed: 175 additions & 2 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib/internal/test_runner
- test
- fixtures/test-runner/source-map-line-lengths
- parallel
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/internal/test_runner/coverage.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/coverage.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
340 | 340 | |
341 | 341 | |
342 | 342 | |
343 | | - |
344 | | - |
| 343 | + |
| 344 | + |
345 | 345 | |
346 | 346 | |
347 | 347 | |
|
Collapse file
test/fixtures/test-runner/source-map-line-lengths/index.js
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/source-map-line-lengths/index.js+77Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file
test/fixtures/test-runner/source-map-line-lengths/index.js.map
Copy file name to clipboardExpand all lines: test/fixtures/test-runner/source-map-line-lengths/index.js.map+7Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file
test/fixtures/test-runner/source-map-line-lengths/index.ts
Copy file name to clipboard+76Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
Collapse file
test/parallel/test-runner-coverage.js
Copy file name to clipboardExpand all lines: test/parallel/test-runner-coverage.js+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
428 | 428 | |
429 | 429 | |
430 | 430 | |
| 431 | + |
| 432 | + |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
| 440 | + |
| 441 | + |
| 442 | + |
| 443 | + |
0 commit comments