From 12f1a81686498fe7b2cf2a347c6ba03bd8eefe49 Mon Sep 17 00:00:00 2001 From: David Dias Date: Thu, 16 Mar 2017 17:48:33 +0000 Subject: [PATCH] test: use dirty-chai --- package.json | 3 ++- test/index.spec.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 18a2b53..09f1f9e 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "devDependencies": { "aegir": "^11.0.0", "chai": "^3.5.0", + "dirty-chai": "^1.2.2", "multihashing-async": "~0.4.4", "pre-commit": "^1.2.2" }, @@ -56,4 +57,4 @@ "greenkeeper[bot] ", "kumavis " ] -} \ No newline at end of file +} diff --git a/test/index.spec.js b/test/index.spec.js index 8853027..f14a09d 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,7 +1,10 @@ /* eslint-env mocha */ 'use strict' -const expect = require('chai').expect +const chai = require('chai') +const dirtyChai = require('dirty-chai') +const expect = chai.expect +chai.use(dirtyChai) const multihash = require('multihashes') const multihashing = require('multihashing-async') @@ -22,7 +25,7 @@ describe('CID', () => { it('handles Buffer multihash', (done) => { multihashing(Buffer('hello world'), 'sha2-256', (err, mh) => { - expect(err).to.not.exist // eslint-disable-line + expect(err).to.not.exist() const mhStr = 'QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4' const cid = new CID(mh)