Skip to content

Commit 141d686

Browse files
committed
refactor(tests): migrate chai -> node:assert
1 parent 7aef2ba commit 141d686

File tree

4 files changed

+28
-187
lines changed

4 files changed

+28
-187
lines changed

package-lock.json

Lines changed: 7 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@
5454
"devDependencies": {
5555
"@babel/preset-env": "^7.20.2",
5656
"@types/babel__core": "^7.1.20",
57-
"@types/chai": "^4.3.4",
5857
"@types/debug": "^4.1.7",
5958
"@types/micromatch": "^4.0.2",
6059
"@types/mocha": "^10.0.0",
6160
"@typescript-eslint/eslint-plugin": "^5.42.1",
6261
"@typescript-eslint/parser": "^5.42.1",
63-
"chai": "^4.3.7",
6462
"codecov": "^3.8.2",
6563
"eslint": "^8.27.0",
6664
"eslint-config-prettier": "^8.5.0",

test/io/statistics.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import * as assert from "node:assert";
12
import { execSync } from "node:child_process";
23

3-
import { expect } from "chai";
4-
54
import TestRepositoryFixture from "../fixtures/test-repository.fixture";
65

76
describe("CLI", () => {
@@ -21,7 +20,8 @@ describe("CLI", () => {
2120
).trim();
2221

2322
// Then
24-
expect(result).to.deep.equal(
23+
assert.deepStrictEqual(
24+
result,
2525
JSON.stringify([
2626
{ path: "a.js", churn: 2, complexity: 2, score: 4 },
2727
{ path: "b.ts", churn: 1, complexity: 1, score: 1 },
@@ -46,7 +46,8 @@ describe("CLI", () => {
4646
).trim();
4747

4848
// Then
49-
expect(result).to.deep.equal(
49+
assert.deepStrictEqual(
50+
result,
5051
["file,complexity,churn,score", "a.js,2,2,4", "b.ts,1,1,1"].join("\n")
5152
);
5253
});

0 commit comments

Comments
 (0)