Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/config.js')
-rw-r--r--test/lib/config.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/test/lib/config.js b/test/lib/config.js
index 48934ba4e..3aeb29f8d 100644
--- a/test/lib/config.js
+++ b/test/lib/config.js
@@ -180,12 +180,7 @@ t.test('config list --json', t => {
t.test('config delete no args', t => {
config.exec(['delete'], (err) => {
- t.equal(
- err.message,
- 'usage instructions',
- 'should throw usage error'
- )
- t.equal(err.code, 'EUSAGE', 'should throw expected error code')
+ t.match(err, { message: '\nUsage: usage instructions' })
t.end()
})
})
@@ -265,11 +260,7 @@ t.test('config delete key --global', t => {
t.test('config set no args', t => {
config.exec(['set'], (err) => {
- t.equal(
- err.message,
- 'usage instructions',
- 'should throw usage error'
- )
+ t.match(err, { message: '\nUsage: usage instructions' })
t.end()
})
})