X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Futils.test.mjs;h=c048141bf2ffcd7aab57de5d9b7aaa178d630137;hb=0bc53e954d6d832092db4ea6ccea8b0f8f071ebe;hp=74c53a1629b7f3ef7738bdbc50e3f908216457dd;hpb=a074ffee1b46f43d0dcfba58128748c7492104dd;p=poolifier.git diff --git a/tests/utils.test.mjs b/tests/utils.test.mjs index 74c53a16..c048141b 100644 --- a/tests/utils.test.mjs +++ b/tests/utils.test.mjs @@ -66,13 +66,15 @@ describe('Utils test suite', () => { it('Verify getWorkerType() behavior', () => { expect( - getWorkerType(new Worker('./tests/worker-files/thread/testWorker.js')) + getWorkerType(new Worker('./tests/worker-files/thread/testWorker.mjs')) ).toBe(WorkerTypes.thread) expect(getWorkerType(cluster.fork())).toBe(WorkerTypes.cluster) }) it('Verify getWorkerId() behavior', () => { - const threadWorker = new Worker('./tests/worker-files/thread/testWorker.js') + const threadWorker = new Worker( + './tests/worker-files/thread/testWorker.mjs' + ) const clusterWorker = cluster.fork() expect(getWorkerId(threadWorker)).toBe(threadWorker.threadId) expect(getWorkerId(clusterWorker)).toBe(clusterWorker.id)