Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Mar 4, 2024
1 parent 7f1bc47 commit d7e1996
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/workers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand All @@ -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);
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/scenario_test.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
5 changes: 3 additions & 2 deletions test/unit/worker_test.js
Original file line number Diff line number Diff line change
@@ -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(() => {
Expand Down

0 comments on commit d7e1996

Please sign in to comment.