mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
20 lines
514 B
TypeScript
Generated
20 lines
514 B
TypeScript
Generated
import { spawnSync } from "bun";
|
|
import { getCounters } from "bun:internal-for-testing";
|
|
|
|
const before = getCounters();
|
|
const result = spawnSync({
|
|
cmd: ["sleep", "0.00001"],
|
|
stdout: "inherit",
|
|
stderr: "pipe",
|
|
stdin: "pipe",
|
|
});
|
|
const after = getCounters();
|
|
|
|
if (!(after.spawnSync_blocking > before.spawnSync_blocking)) {
|
|
throw new Error("spawnSync_blocking should have been incremented");
|
|
}
|
|
|
|
if (after.spawn_memfd <= before.spawn_memfd) {
|
|
throw new Error("spawn_memfd should have been incremented");
|
|
}
|