diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d0d6371 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf +*.png binary diff --git a/tests/fixtures/emitter.mjs b/tests/fixtures/emitter.mjs index 99a10b4..778f21d 100644 --- a/tests/fixtures/emitter.mjs +++ b/tests/fixtures/emitter.mjs @@ -2,5 +2,9 @@ console.log('{"method":"GET","path":"/test","status":200,"durationMs":3}'); console.error('WARN: fixture warning'); console.error('TypeError: fixture failure'); console.error(' at fixture (emitter.mjs:3:1)'); -console.log('after error'); -process.exitCode = 7; +// stdout and stderr are separate pipes, so give the parent time to read the +// stderr lines before the stdout line that should flush the stack trace. +setTimeout(() => { + console.log('after error'); + process.exitCode = 7; +}, 100);