mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 22:32:06 +00:00
fix inspect_port in initBake/second init, reorder exit code assertions in tests
This commit is contained in:
@@ -1235,6 +1235,7 @@ pub fn init(opts: Options) !*VirtualMachine {
|
||||
if (opts.smol)
|
||||
is_smol_mode = opts.smol;
|
||||
|
||||
vm.inspect_port = opts.inspect_port;
|
||||
vm.configureDebugger(opts.debugger);
|
||||
vm.body_value_hive_allocator = Body.Value.HiveAllocator.init(bun.typedAllocator(jsc.WebCore.Body.Value));
|
||||
|
||||
@@ -1494,6 +1495,7 @@ pub fn initBake(opts: Options) anyerror!*VirtualMachine {
|
||||
if (opts.smol)
|
||||
is_smol_mode = opts.smol;
|
||||
|
||||
vm.inspect_port = opts.inspect_port;
|
||||
vm.configureDebugger(opts.debugger);
|
||||
vm.body_value_hive_allocator = Body.Value.HiveAllocator.init(bun.typedAllocator(jsc.WebCore.Body.Value));
|
||||
|
||||
|
||||
@@ -246,7 +246,9 @@ describe.skipIf(!isWindows)("Runtime inspector Windows file mapping", () => {
|
||||
stderr: "pipe",
|
||||
});
|
||||
|
||||
expect(await debug1.exited).toBe(0);
|
||||
const [debug1Stderr, debug1ExitCode] = await Promise.all([debug1.stderr.text(), debug1.exited]);
|
||||
expect(debug1Stderr).toBe("");
|
||||
expect(debug1ExitCode).toBe(0);
|
||||
|
||||
// Wait for the full banner
|
||||
const stderrReader1 = target1.stderr.getReader();
|
||||
@@ -283,7 +285,9 @@ describe.skipIf(!isWindows)("Runtime inspector Windows file mapping", () => {
|
||||
stderr: "pipe",
|
||||
});
|
||||
|
||||
expect(await debug2.exited).toBe(0);
|
||||
const [debug2Stderr, debug2ExitCode] = await Promise.all([debug2.stderr.text(), debug2.exited]);
|
||||
expect(debug2Stderr).toBe("");
|
||||
expect(debug2ExitCode).toBe(0);
|
||||
|
||||
// Wait for the full banner
|
||||
const stderrReader2 = target2.stderr.getReader();
|
||||
|
||||
@@ -407,7 +407,9 @@ describe("Runtime inspector activation", () => {
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
});
|
||||
expect(await debugProc.exited).toBe(0);
|
||||
const [debugStderr, debugExitCode] = await Promise.all([debugProc.stderr.text(), debugProc.exited]);
|
||||
expect(debugStderr).toBe("");
|
||||
expect(debugExitCode).toBe(0);
|
||||
|
||||
// Wait for inspector banner and extract WS URL
|
||||
const { stderr: targetStderr } = await waitForDebuggerListening(targetProc.stderr);
|
||||
|
||||
Reference in New Issue
Block a user