Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

fix: configure chai for use by other modules #537

Merged
merged 1 commit into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"bs58": "^4.0.1",
"callbackify": "^1.1.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"cids": "~0.7.1",
"concat-stream": "^2.0.0",
"delay": "^4.3.0",
Expand Down
7 changes: 1 addition & 6 deletions src/key/rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const chai = require('chai')
const dirtyChai = require('dirty-chai')
const hat = require('hat')
const { getDescribe, getIt } = require('../utils/mocha')

const expect = chai.expect
chai.use(dirtyChai)
const { getDescribe, getIt, expect } = require('../utils/mocha')

module.exports = (createCommon, options) => {
const describe = getDescribe(options)
Expand Down
5 changes: 3 additions & 2 deletions src/utils/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
'use strict'

const chai = require('chai')
const dirtyChai = require('dirty-chai')

chai.use(dirtyChai)
// Do not reorder these statements - https://github.com/chaijs/chai/issues/1298
chai.use(require('chai-as-promised'))
chai.use(require('dirty-chai'))

module.exports.expect = chai.expect

Expand Down