-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly populate cached js filename and fix misaligned columns (#528)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a3aef08
commit 9aaee33
Showing
3 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const assert = require('assert'); | ||
const childProcess = require('child_process'); | ||
const path = require('path'); | ||
|
||
(function main() { | ||
if (process.env.CHILD !== 'stack-trace') { | ||
const cp = childProcess.fork(__filename, [], { | ||
stdio: 'pipe', | ||
env: Object.assign({}, process.env, { | ||
CHILD: 'stack-trace', | ||
}) | ||
}); | ||
let stdoutBuffers = [] | ||
cp.stdout.on('data', data => stdoutBuffers.push(data)); | ||
|
||
cp.on('exit', (code) => { | ||
const stdout = Buffer.concat(stdoutBuffers).toString('utf8') | ||
if (code !== 0) { | ||
process.stderr.write(stdout); | ||
return process.exit(1); | ||
} | ||
assert(stdout.match(/evalmachine.<anonymous>/) == null); | ||
assert(stdout.match(path.basename(__filename)) != null); | ||
}); | ||
return; | ||
} | ||
|
||
console.log(new Error('foo')); | ||
})(); |