Skip to content

Commit 2dd1257

Browse files
aduh95MoLow
andcommitted
chore(test): migrate to node:test
Co-authored-by: Moshe Atlow <moshe@atlow.co.il>
1 parent 1ad864e commit 2dd1257

19 files changed

+19
-9
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
"scripts": {
1717
"test": "npm run test-unit && npm run lint",
18-
"test-unit": "mocha --timeout 60000 test/unit/*.test.js --exit",
19-
"test-all": "mocha --timeout 60000 test/**/*.test.js --exit",
18+
"test-unit": "node --test test/unit",
19+
"test-all": "node --test",
2020
"coverage": "c8 --reporter=html --reporter=text --reporter=text-summary npm test",
2121
"coverage-all": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test-all",
2222
"lint": "eslint . --cache",
@@ -61,7 +61,6 @@
6161
"eslint-plugin-import": "^2.27.5",
6262
"eslint-plugin-n": "^15.6.1",
6363
"eslint-plugin-promise": "^6.1.1",
64-
"mocha": "^10.2.0",
6564
"sinon": "^15.0.1"
6665
}
6766
}

test/.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/unit/auth.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from 'node:test';
12
import { spawn } from 'node:child_process';
23
import path from 'node:path';
34
import fs from 'node:fs';

test/unit/cache.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from 'node:test';
12
import path from 'node:path';
23
import fs from 'node:fs';
34
import assert from 'node:assert';

test/unit/ci_failure_parser.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from 'node:test';
12
import assert from 'node:assert';
23

34
import CIFailureParser from '../../lib/ci/ci_failure_parser.js';

test/unit/ci_result_parser.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from 'node:test';
12
import assert from 'node:assert';
23
import { fileURLToPath } from 'node:url';
34
import path from 'node:path';

test/unit/ci_start.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it, before } from 'node:test';
12
import assert from 'assert';
23

34
import sinon from 'sinon';

test/unit/ci_type_parser.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from 'node:test';
12
import assert from 'node:assert';
23

34
import {

test/unit/cli.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it, beforeEach, afterEach } from 'node:test';
12
import assert from 'node:assert';
23

34
import CLI from '../../lib/cli.js';

test/unit/collaborators.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it, beforeEach } from 'node:test';
12
import { fileURLToPath } from 'node:url';
23
import assert from 'node:assert';
34

0 commit comments

Comments
 (0)