chore: update aegir

This commit is contained in:
David Dias
2017-03-21 15:05:22 +00:00
parent e0ecce18ce
commit 2f065167fa
10 changed files with 72 additions and 45 deletions

View File

@ -3,7 +3,10 @@
'use strict'
const Buffer = require('safe-buffer').Buffer
const expect = require('chai').expect
const chai = require('chai')
const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)
const crypto = require('../src')
@ -13,10 +16,10 @@ describe('HMAC', () => {
hashes.forEach((hash) => {
it(`${hash} - sign and verify`, (done) => {
crypto.hmac.create(hash, Buffer.from('secret'), (err, hmac) => {
expect(err).to.not.exist
expect(err).to.not.exist()
hmac.digest(Buffer.from('hello world'), (err, sig) => {
expect(err).to.not.exist
expect(err).to.not.exist()
expect(sig).to.have.length(hmac.length)
done()
})