From: Jérôme Benoit Date: Sat, 29 Jul 2023 10:34:48 +0000 (+0200) Subject: refactor: cleanup worker method typing X-Git-Tag: v2.6.21~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d655027ba35d40bd823574f630debc7c3a860638;p=poolifier.git refactor: cleanup worker method typing Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index ec5dea8e..dc628bed 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -67,7 +67,7 @@ export class ThreadWorker< } /** @inheritDoc */ - protected handleKillMessage (message: MessageValue): void { + protected handleKillMessage (message: MessageValue): void { super.handleKillMessage(message) this.port?.unref() this.port?.close() diff --git a/tests/circular-array.test.js b/tests/circular-array.test.js index d821b6cd..a8637234 100644 --- a/tests/circular-array.test.js +++ b/tests/circular-array.test.js @@ -133,6 +133,10 @@ describe('Circular array test suite', () => { expect(circularArray.size).toBe(0) expect(circularArray).toStrictEqual(new CircularArray(0)) circularArray = new CircularArray(5, 1, 2, 3, 4, 5) + circularArray.resize(1) + expect(circularArray.size).toBe(1) + expect(circularArray).toStrictEqual(new CircularArray(1, 1)) + circularArray = new CircularArray(5, 1, 2, 3, 4, 5) circularArray.resize(3) expect(circularArray.size).toBe(3) expect(circularArray).toStrictEqual(new CircularArray(3, 1, 2, 3))