| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -560,7 +560,7 @@ class Test extends AsyncResource { | |||
| 560 | 560 | const map = lazyFindSourceMap(this.loc.file); | |
| 561 | 561 | const entry = map?.findEntry(this.loc.line - 1, this.loc.column - 1); | |
| 562 | 562 | ||
| 563 | - if (entry !== undefined) { | ||
| 563 | + if (entry?.originalSource !== undefined) { | ||
| 564 | 564 | this.loc.line = entry.originalLine + 1; | |
| 565 | 565 | this.loc.column = entry.originalColumn + 1; | |
| 566 | 566 | this.loc.file = entry.originalSource; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + require('../common'); | ||
| 3 | + const assert = require('node:assert'); | ||
| 4 | + const { spawnSync } = require('node:child_process'); | ||
| 5 | + const { test } = require('node:test'); | ||
| 6 | + const fixtures = require('../common/fixtures'); | ||
| 7 | + | ||
| 8 | + test('ensures --enable-source-maps does not throw an error', () => { | ||
| 9 | + const fixture = fixtures.path('test-runner', 'coverage', 'stdin.test.js'); | ||
| 10 | + const args = ['--enable-source-maps', fixture]; | ||
| 11 | + | ||
| 12 | + const result = spawnSync(process.execPath, args); | ||
| 13 | + | ||
| 14 | + assert.strictEqual(result.stderr.toString(), ''); | ||
| 15 | + assert.strictEqual(result.status, 0); | ||
| 16 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments