Skip to content

Commit dc7c5d1

Browse files
committed
chore: fix tests for node v20
1 parent 238fc4a commit dc7c5d1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/bin/apply.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ t.afterEach(() => {
2727

2828
t.test('when npm_config_local_prefix is unset, does nothing', async (t) => {
2929
await templateApply()
30-
t.equal(process.exitCode, undefined, 'exitCode is unset')
30+
t.notOk(process.exitCode, 'exitCode is unset')
3131
})
3232

3333
t.test('when npm_config_global is true, does nothing', async (t) => {
3434
process.env.npm_config_global = 'true'
3535

3636
await templateApply()
37-
t.equal(process.exitCode, undefined, 'exitCode is unset')
37+
t.notOk(process.exitCode, 'exitCode is unset')
3838
})
3939

4040
t.test('with mocks', async (t) => {
4141
process.env.npm_config_local_prefix = 'heynow'
4242

4343
await templateApply(() => {})
44-
t.equal(process.exitCode, undefined, 'exitCode is unset')
44+
t.notOk(process.exitCode, 'exitCode is unset')
4545
})
4646

4747
t.test('error', async (t) => {
@@ -50,5 +50,5 @@ t.test('error', async (t) => {
5050
await templateApply(() => {
5151
throw new Error('apply')
5252
})
53-
t.equal(process.exitCode, 1, 'exitCode is unset')
53+
t.ok(process.exitCode, 'exitCode is unset')
5454
})

test/bin/check.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ t.test('problems', async (t) => {
4444
solution: 'solution2',
4545
}])
4646

47-
t.equal(process.exitCode, 1, 'exit code')
47+
t.ok(process.exitCode, 'exit code')
4848
t.matchSnapshot(errors.join('\n'))
4949
})
5050

@@ -53,6 +53,6 @@ t.test('no problems', async (t) => {
5353

5454
await templateCheck(() => [])
5555

56-
t.equal(process.exitCode, undefined, 'exit code')
56+
t.notOk(process.exitCode, 'exit code')
5757
t.strictSame(errors, [], 'errors')
5858
})

0 commit comments

Comments
 (0)