From d7e199655c4b559b8d6f2314c5094c4a5e12f221 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Mon, 4 Mar 2024 14:24:55 +0100 Subject: [PATCH] fix: test --- lib/workers.js | 2 ++ test/unit/scenario_test.js | 2 +- test/unit/worker_test.js | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/workers.js b/lib/workers.js index 83747904f..d8cae7bc4 100644 --- a/lib/workers.js +++ b/lib/workers.js @@ -314,6 +314,7 @@ export class Workers extends EventEmitter { mocha.suite.eachTest((test) => { const i = groupCounter % groups.length; if (test) { + // @ts-ignore groups[i].push(test.uid); groupCounter++; } @@ -335,6 +336,7 @@ export class Workers extends EventEmitter { const i = indexOfSmallestElement(groups); suite.tests.forEach((test) => { if (test) { + // @ts-ignore groups[i].push(test.uid); } }); diff --git a/test/unit/scenario_test.js b/test/unit/scenario_test.js index 70a3d2f95..d0486f47d 100644 --- a/test/unit/scenario_test.js +++ b/test/unit/scenario_test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; -import * as Scenario from '../../lib/Scenario.js'; +import * as Scenario from '../../lib/scenario.js'; import recorder from '../../lib/recorder.js'; import * as event from '../../lib/event.js'; diff --git a/test/unit/worker_test.js b/test/unit/worker_test.js index 54c38fcab..9cd42b264 100644 --- a/test/unit/worker_test.js +++ b/test/unit/worker_test.js @@ -1,10 +1,11 @@ import { expect } from 'chai'; -import path from 'path'; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; import { Workers } from '../../lib/workers.js'; import * as event from '../../lib/event.js'; import recorder from '../../lib/recorder.js'; -const __dirname = path.resolve('.'); +const __dirname = dirname(fileURLToPath(import.meta.url)); describe('Workers', function () { this.timeout(40000); before(() => {