aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/esbuild-child_process.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/esbuild-child_process.test.ts')
-rw-r--r--test/bun.js/esbuild-child_process.test.ts29
1 files changed, 16 insertions, 13 deletions
diff --git a/test/bun.js/esbuild-child_process.test.ts b/test/bun.js/esbuild-child_process.test.ts
index 0d357a940..a7eb4f079 100644
--- a/test/bun.js/esbuild-child_process.test.ts
+++ b/test/bun.js/esbuild-child_process.test.ts
@@ -12,11 +12,14 @@ describe("child_process.spawn - esbuild", () => {
it("works for input exceeding the pipe capacity", async () => {
const hugeString = `console.log(${JSON.stringify("a".repeat(1000000))});`;
- const result = await transform(hugeString, {
- loader: "js",
- target: "node12",
- });
- expect(result.code).toBe(hugeString + "\n");
+
+ for (let i = 0; i < 2; i++) {
+ const result = await transform(hugeString, {
+ loader: "js",
+ target: "node12",
+ });
+ expect(result.code).toBe(hugeString + "\n");
+ }
});
});
@@ -35,12 +38,12 @@ describe("child_process.spawnSync - esbuild", () => {
// code: "13"
// syscall: "spawnSync"
// errno: -1
- // it("works for input exceeding the pipe capacity", () => {
- // const hugeString = `console.log(${JSON.stringify("a".repeat(100000))});`;
- // const result = transformSync(hugeString, {
- // loader: "js",
- // target: "node12",
- // });
- // expect(result.code).toBe(hugeString + "\n");
- // });
+ it("works for input exceeding the pipe capacity", () => {
+ const hugeString = `console.log(${JSON.stringify("a".repeat(100000))});`;
+ const result = transformSync(hugeString, {
+ loader: "js",
+ target: "node12",
+ });
+ expect(result.code).toBe(hugeString + "\n");
+ });
});