From c8a8d0e55c6e5ac435ce432742f71393b2f0e212 Mon Sep 17 00:00:00 2001 From: autoantohaki Date: Wed, 21 Oct 2026 17:48:25 -0300 Subject: [PATCH] fix: make CI pass on Windows and Linux Normalize text files to LF so Prettier's format check passes on Windows checkouts, and let the stderr stack trace reach the parent before the stdout line that should follow it in the process test fixture. --- .gitattributes | 2 ++ tests/fixtures/emitter.mjs | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .gitattributes 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);