forked from Mirrors/doipjs
Run prettier
This commit is contained in:
parent
9db48d627d
commit
6c2aa92187
2 changed files with 10 additions and 7 deletions
|
@ -20,7 +20,8 @@ const keys = require('./keys')
|
|||
|
||||
const verify = (signature, opts) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let errors = [], sigData
|
||||
let errors = [],
|
||||
sigData
|
||||
try {
|
||||
sigData = await openpgp.cleartext.readArmored(signature)
|
||||
} catch (error) {
|
||||
|
@ -72,7 +73,7 @@ const verify = (signature, opts) => {
|
|||
errors: errors,
|
||||
publicKey: keyData,
|
||||
fingerprint: fingerprint,
|
||||
claims: claimVerifications
|
||||
claims: claimVerifications,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -49,7 +49,9 @@ describe('signatures.verify', () => {
|
|||
it('should verify the demonstration signature', async () => {
|
||||
const verification = await doipjs.signatures.verify(sigProfile)
|
||||
expect(verification.errors).to.be.length(0)
|
||||
expect(verification.fingerprint).to.be.equal('3637202523e7c1309ab79e99ef2dc5827b445f4b')
|
||||
expect(verification.fingerprint).to.be.equal(
|
||||
'3637202523e7c1309ab79e99ef2dc5827b445f4b'
|
||||
)
|
||||
expect(verification.claims).to.be.length(1)
|
||||
expect(verification.claims[0].isVerified).to.be.true
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue