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

Commit cd11b9f

Browse files
committed
fix: allow use of testing promises
1 parent 6d202e3 commit cd11b9f

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/key/rename.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
/* eslint max-nested-callbacks: ["error", 6] */
33
'use strict'
44

5-
const chai = require('chai')
6-
const dirtyChai = require('dirty-chai')
75
const hat = require('hat')
8-
const { getDescribe, getIt } = require('../utils/mocha')
9-
10-
const expect = chai.expect
11-
chai.use(dirtyChai)
6+
const { getDescribe, getIt, expect } = require('../utils/mocha')
127

138
module.exports = (createCommon, options) => {
149
const describe = getDescribe(options)

src/utils/mocha.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
'use strict'
33

44
const chai = require('chai')
5-
const dirtyChai = require('dirty-chai')
6-
const chaiAsPromised = require('chai-as-promised')
75

8-
chai.use(dirtyChai)
9-
chai.use(chaiAsPromised)
6+
// Do not reorder these statements - https://github.com/chaijs/chai/issues/1298
7+
chai.use(require('chai-as-promised'))
8+
chai.use(require('dirty-chai'))
109

1110
module.exports.expect = chai.expect
1211

0 commit comments

Comments
 (0)