Skip to content

Commit

Permalink
update error checks for new ava version
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed May 17, 2021
1 parent 20946b1 commit 2cd9cf3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions wrappers/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"ava": "^1.4.1",
"cuid": "^2.1.4",
"home-dir": "^1.0.0",
"standard": "^12.0.1",
"tempy": "^0.3.0"
"standard": "^16.0.3",
"tempy": "^1.0.0"
},
"ava": {
"timeout": "2m"
}
}
4 changes: 2 additions & 2 deletions wrappers/nodejs/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ test('wrapper essentials', async function (t) {

err = t.throws(function () {
indy.abbreviateVerkey(1, verkey)
}, Error)
}, { instanceOf: Error })
t.is(err.message, 'abbreviateVerkey expects String or null for did')

err = t.throws(function () {
indy.abbreviateVerkey(did, [1, 2, 3])
}, Error)
}, { instanceOf: Error })
t.is(err.message, 'abbreviateVerkey expects String or null for fullVerkey')

err = await t.throwsAsync(indy.abbreviateVerkey(null, verkey))
Expand Down
2 changes: 1 addition & 1 deletion wrappers/nodejs/test/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ test('setDefaultLogger', function (t) {

const err = t.throws(function () {
indy.setDefaultLogger('foo')
}, IndyError)
}, { instanceOf: IndyError })
t.is(err.indyName, 'CommonInvalidState')
})
2 changes: 1 addition & 1 deletion wrappers/nodejs/test/logger2.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ test('setLogger', async function (t) {

const err = t.throws(function () {
indy.setLogger(function () {})
}, IndyError)
}, { instanceOf: IndyError })
t.is(err.indyName, 'CommonInvalidState')
})

0 comments on commit 2cd9cf3

Please sign in to comment.