From 919454ea3049db7dd20e18f89ac16fcbb51db1bb Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Tue, 27 May 2025 16:19:27 -0700 Subject: [PATCH] we should test p.destroy() --- test/js/third_party/piscina/piscina.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/js/third_party/piscina/piscina.test.ts b/test/js/third_party/piscina/piscina.test.ts index cfbc317b1f..a1d9acf74c 100644 --- a/test/js/third_party/piscina/piscina.test.ts +++ b/test/js/third_party/piscina/piscina.test.ts @@ -9,6 +9,8 @@ test("Piscina basic functionality", async () => { const result = await piscina.run({ a: 4, b: 6 }); expect(result).toBe(10); + + await piscina.destroy(); }); test("Piscina event loop cleanup", async () => { @@ -23,6 +25,8 @@ test("Piscina event loop cleanup", async () => { ]); expect(results).toEqual([3, 7, 11]); + + await piscina.destroy(); }); test("Piscina with idleTimeout", async () => { @@ -34,6 +38,8 @@ test("Piscina with idleTimeout", async () => { const result = await piscina.run({ a: 10, b: 20 }); expect(result).toBe(30); + + await piscina.destroy(); }); test("Piscina error handling", async () => { @@ -47,6 +53,8 @@ test("Piscina error handling", async () => { ); expect(p).toBe(false); + + await piscina.destroy(); }); setTimeout(() => {