aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js')
-rw-r--r--test/bun.js/spawn.test.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/bun.js/spawn.test.ts b/test/bun.js/spawn.test.ts
index ea062de59..313606cd7 100644
--- a/test/bun.js/spawn.test.ts
+++ b/test/bun.js/spawn.test.ts
@@ -53,7 +53,7 @@ for (let [gcTick, label] of [
const process = Bun.spawnSync({
cmd: ["bash", "-c", "sleep 2"],
stdout: "pipe",
- signal: controller.signal
+ signal: controller.signal,
});
gcTick();
expect(process.exitCode).toBe(null);
@@ -394,22 +394,21 @@ for (let [gcTick, label] of [
const process = Bun.spawn({
cmd: ["bash", "-c", "sleep 2"],
stdout: "pipe",
- signal: controller.signal
+ signal: controller.signal,
});
gcTick();
- setTimeout(()=> {
+ setTimeout(() => {
controller.abort();
- }, 15)
-
+ }, 15);
+
try {
await process.exited;
- } catch(err) {
+ } catch (err) {
expect(err instanceof DOMException).toBe(true);
expect(err?.name).toBe("AbortError");
expect(err?.message).toBe("The operation was aborted.");
}
-
});
});
});
-} \ No newline at end of file
+}