diff --git a/test/bin/apply.js b/test/bin/apply.js index 40f958fe..ab4d2981 100644 --- a/test/bin/apply.js +++ b/test/bin/apply.js @@ -27,21 +27,21 @@ t.afterEach(() => { t.test('when npm_config_local_prefix is unset, does nothing', async (t) => { await templateApply() - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('when npm_config_global is true, does nothing', async (t) => { process.env.npm_config_global = 'true' await templateApply() - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('with mocks', async (t) => { process.env.npm_config_local_prefix = 'heynow' await templateApply(() => {}) - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('error', async (t) => { @@ -50,5 +50,5 @@ t.test('error', async (t) => { await templateApply(() => { throw new Error('apply') }) - t.equal(process.exitCode, 1, 'exitCode is unset') + t.ok(process.exitCode, 'exitCode is unset') }) diff --git a/test/bin/check.js b/test/bin/check.js index 6841ceea..12aba611 100644 --- a/test/bin/check.js +++ b/test/bin/check.js @@ -44,7 +44,7 @@ t.test('problems', async (t) => { solution: 'solution2', }]) - t.equal(process.exitCode, 1, 'exit code') + t.ok(process.exitCode, 'exit code') t.matchSnapshot(errors.join('\n')) }) @@ -53,6 +53,6 @@ t.test('no problems', async (t) => { await templateCheck(() => []) - t.equal(process.exitCode, undefined, 'exit code') + t.notOk(process.exitCode, 'exit code') t.strictSame(errors, [], 'errors') })