Skip to content

Commit

Permalink
Replace chai with node:assert
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Jul 25, 2023
1 parent 8d1ac64 commit 3e1e9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@
"test": "run-s check test:*"
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/node": "^18.17.0",
"@voxpelli/eslint-config": "^18.0.0",
"@voxpelli/tsconfig": "^8.0.0",
"c8": "^8.0.0",
"chai": "^4.3.7",
"eslint": "^8.45.0",
"eslint-plugin-es-x": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
Expand Down
9 changes: 4 additions & 5 deletions test/utils.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { describe, it } from 'node:test';

import chai from 'chai';
import assert from 'node:assert/strict';

import { getErrorAndCauses } from '../lib/utils.js';

chai.should();

describe('Utils', () => {
describe('getErrorAndCauses()', () => {
it('should return a list of an error and all of its causes', () => {
Expand All @@ -15,7 +12,9 @@ describe('Utils', () => {

const errorAndCauses = getErrorAndCauses(err3);

errorAndCauses.should.be.an('array').of.length(3).that.deep.equals([
assert(Array.isArray(errorAndCauses), 'An array is returned');
assert(errorAndCauses.length === 3, 'The array has the correct length');
assert.deepStrictEqual(errorAndCauses, [
err3,
err2,
err1,
Expand Down

0 comments on commit 3e1e9a8

Please sign in to comment.