Skip to content

Commit

Permalink
chore(test): migrate to node:test
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Feb 26, 2023
1 parent 6926407 commit eebf191
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 9 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"scripts": {
"test": "npm run test-unit && npm run lint",
"test-unit": "mocha --timeout 60000 test/unit/*.test.js --exit",
"test-all": "mocha --timeout 60000 test/**/*.test.js --exit",
"test-unit": "node --test test/unit",
"test-all": "node --test",
"coverage": "c8 --reporter=html --reporter=text --reporter=text-summary npm test",
"coverage-all": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test-all",
"lint": "eslint . --cache",
Expand Down Expand Up @@ -63,7 +63,6 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"mocha": "^10.2.0",
"sinon": "^15.0.1"
}
}
6 changes: 0 additions & 6 deletions test/.eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions test/unit/auth.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import { spawn } from 'node:child_process';
import path from 'node:path';
import fs from 'node:fs';
Expand Down
1 change: 1 addition & 0 deletions test/unit/cache.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import path from 'node:path';
import fs from 'node:fs';
import assert from 'node:assert';
Expand Down
1 change: 1 addition & 0 deletions test/unit/ci_failure_parser.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import CIFailureParser from '../../lib/ci/ci_failure_parser.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/ci_result_parser.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { fileURLToPath } from 'node:url';
import path from 'node:path';
Expand Down
1 change: 1 addition & 0 deletions test/unit/ci_start.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, before } from 'node:test';
import assert from 'assert';

import sinon from 'sinon';
Expand Down
1 change: 1 addition & 0 deletions test/unit/ci_type_parser.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import {
Expand Down
1 change: 1 addition & 0 deletions test/unit/cli.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, beforeEach, afterEach } from 'node:test';
import assert from 'node:assert';

import CLI from '../../lib/cli.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/collaborators.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, beforeEach } from 'node:test';
import { fileURLToPath } from 'node:url';
import assert from 'node:assert';

Expand Down
1 change: 1 addition & 0 deletions test/unit/comp.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import { ascending, descending } from '../../lib/utils.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/links.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import { LinkParser, parsePRFromURL } from '../../lib/links.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/metadata_gen.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import MetadataGenerator from '../../lib/metadata_gen.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/pr_checker.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, before, after, afterEach } from 'node:test';
import assert from 'node:assert';

import sinon from 'sinon';
Expand Down
1 change: 1 addition & 0 deletions test/unit/pr_data.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import sinon from 'sinon';
Expand Down
1 change: 1 addition & 0 deletions test/unit/pr_summary.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import PRSummary from '../../lib/pr_summary.js';

import {
Expand Down
1 change: 1 addition & 0 deletions test/unit/prepare_release.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { readFileSync } from 'node:fs';

Expand Down
1 change: 1 addition & 0 deletions test/unit/reviews.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';

import { ReviewAnalyzer } from '../../lib/reviews.js';
Expand Down
1 change: 1 addition & 0 deletions test/unit/team_info.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, before, after } from 'node:test';
import assert from 'node:assert';

import sinon from 'sinon';
Expand Down

0 comments on commit eebf191

Please sign in to comment.