Skip to content

Commit a1c1ea6

Browse files
authored
Merge pull request #275 from sjinks/drop-chai
chore(dev-deps): drop `chai`
2 parents 0d12668 + c3a15d3 commit a1c1ea6

4 files changed

Lines changed: 10 additions & 99 deletions

File tree

package-lock.json

Lines changed: 0 additions & 88 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
},
2626
"homepage": "https://github.com/sjinks/node-config-reloadable#readme",
2727
"devDependencies": {
28-
"chai": "^4.3.10",
2928
"config": "^3.3.9",
3029
"mocha": "^10.2.0",
3130
"nyc": "^15.1.0"

test/test-sighup.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const { expect } = require('chai');
2-
const path = require('path');
1+
const { notDeepEqual } = require('node:assert/strict');
2+
const { join } = require('node:path');
33

4-
process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config');
4+
process.env.NODE_CONFIG_DIR = join(__dirname, 'config');
55
process.env.NODE_CONFIG = '{ "prop": "value" }';
66

77
const config = require('../index');
@@ -22,7 +22,7 @@ it('Test config reload on SIGHUP', function (done) {
2222

2323
const runTest = () => {
2424
const r2 = conf.get('rand');
25-
expect(r1).not.to.be.deep.equal(r2);
25+
notDeepEqual(r1, r2);
2626
};
2727

2828
const wait = () => {

test/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
const { expect } = require('chai');
2-
const path = require('path');
1+
const { deepEqual, notDeepEqual } = require('node:assert/strict');
2+
const { join } = require('node:path');
33

4-
process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config');
4+
process.env.NODE_CONFIG_DIR = join(__dirname, 'config');
55
process.env.NODE_CONFIG = '{ "prop": "value" }';
66

77
const config = require('../index');
88

99
it('By default, config is immutable', function () {
1010
const r1 = config().get('rand');
1111
const r2 = config().get('rand');
12-
expect(r1).to.be.deep.equal(r2);
12+
deepEqual(r1, r2);
1313
});
1414

1515
it('config.reload() should reload the config', function () {
1616
const r1 = config().get('rand');
1717
config.reloadConfigs();
1818
const r2 = config().get('rand');
19-
expect(r1).not.to.be.deep.equal(r2);
19+
notDeepEqual(r1, r2);
2020
});
2121

2222
it('config(true) should reload the config', function () {
2323
const r1 = config().get('rand');
2424
const r2 = config(true).get('rand');
25-
expect(r1).not.to.be.deep.equal(r2);
25+
notDeepEqual(r1, r2);
2626
});

0 commit comments

Comments
 (0)