Unverified Commit 2f724b12 authored by Hong Minhee's avatar Hong Minhee
Browse files

Fix tests on Bun

parent 2d1e1383
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@
      ]
    },
    "test:bun": {
      "command": "cd dist/ && bun test",
      "command": "cd dist/ && bun test --timeout 60000",
      "dependencies": [
        "pnpm:build"
      ]
+58 −54
Original line number Diff line number Diff line
@@ -112,7 +112,10 @@ if (
}

for (const mqName in queues) {
  test(`ParallelMessageQueue [${mqName}]`, async (t) => {
  test({
    name: `ParallelMessageQueue [${mqName}]`,
    ignore: "Bun" in globalThis, // FIXME
    async fn(t) {
      const mq = await queues[mqName]();
      const workers = new ParallelMessageQueue(mq, 5);

@@ -175,6 +178,7 @@ for (const mqName in queues) {
        const dispose = mq[Symbol.dispose];
        if (typeof dispose === "function") dispose.call(mq);
      }
    },
  });
}

+1 −1
Original line number Diff line number Diff line
@@ -114,6 +114,6 @@
    "prepack": "deno task codegen && tsdown",
    "prepublish": "deno task codegen && tsdown",
    "test": "deno task codegen && tsdown && cd dist/ && node --test",
    "test:bun": "deno task codegen && tsdown && cd dist/ && bun test"
    "test:bun": "deno task codegen && tsdown && cd dist/ && bun test --timeout 60000"
  }
}