-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows: fix sometimes crash when FDImpl.uv() is called on stdio (#13719
) Co-authored-by: Jarred Sumner <[email protected]> Co-authored-by: Dave Caruso <[email protected]> Co-authored-by: nektro <[email protected]>
- Loading branch information
1 parent
f0a4b9f
commit de5809b
Showing
4 changed files
with
57 additions
and
8 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
Binary file not shown.
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,32 @@ | ||
import { expect, it } from "bun:test"; | ||
import { bunEnv, bunExe } from "harness"; | ||
|
||
it("using pino does not crash, particularly on windows", async () => { | ||
const proc = Bun.spawnSync({ | ||
cmd: [ | ||
bunExe(), | ||
"-e", | ||
` | ||
const pino = require("pino"); | ||
const logger = pino({ | ||
transport: { | ||
target: "pino-pretty", | ||
options: { colorize: true }, | ||
}, | ||
}); | ||
logger.info("hi"); | ||
`, | ||
], | ||
env: bunEnv, | ||
stdio: ["inherit", "pipe", "pipe"], | ||
cwd: import.meta.dir, | ||
}); | ||
|
||
const err = proc.stderr.toString("utf8"); | ||
const out = proc.stdout.toString("utf8"); | ||
|
||
expect(err).toBeEmpty(); | ||
expect(out).toContain("\u001B[32mINFO\u001B[39m"); | ||
expect(out).toContain("\u001B[36mhi\u001B[39m\n"); | ||
expect(proc.exitCode).toBe(0); | ||
}); |
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