File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 28
28
"devDependencies" : {
29
29
"chai" : " ^4.1.2" ,
30
30
"chai-as-promised" : " ^7.1.1" ,
31
+ "chai-subset" : " ^1.6.0" ,
31
32
"dirty-chai" : " ^2.0.1" ,
32
33
"fixd" : " ^1.0.1" ,
33
34
"istanbul" : " ^0.4.5" ,
54
55
"globals" : [
55
56
" sinon" ,
56
57
" fixd" ,
57
- " expect"
58
+ " expect" ,
59
+ " sandbox"
58
60
]
59
61
}
60
62
}
Original file line number Diff line number Diff line change 1
1
const chai = require ( 'chai' )
2
2
const dirtyChai = require ( 'dirty-chai' )
3
3
const chaiAsPromised = require ( 'chai-as-promised' )
4
+ const chaiSubset = require ( 'chai-subset' )
4
5
const mod = require ( 'module' )
5
6
const path = require ( 'path' )
6
7
const sinon = require ( 'sinon' )
@@ -12,11 +13,17 @@ const fixd = require('fixd')
12
13
global . expect = chai . expect
13
14
chai . use ( chaiAsPromised )
14
15
chai . use ( dirtyChai )
16
+ chai . use ( chaiSubset )
15
17
chai . use ( sinonChai )
16
18
17
19
// Sinon
18
20
// ----------------------------------------
19
21
global . sinon = sinon
22
+ global . sandbox = sinon . sandbox . create ( )
23
+
24
+ if ( global . afterEach ) {
25
+ afterEach ( ( ) => global . sandbox . restore ( ) )
26
+ }
20
27
21
28
// Fixd
22
29
// ----------------------------------------
Original file line number Diff line number Diff line change @@ -301,6 +301,10 @@ chai-as-promised@^7.1.1:
301
301
dependencies :
302
302
check-error "^1.0.2"
303
303
304
+ chai-subset@^1.6.0 :
305
+ version "1.6.0"
306
+ resolved "https://registry.yarnpkg.com/chai-subset/-/chai-subset-1.6.0.tgz#a5d0ca14e329a79596ed70058b6646bd6988cfe9"
307
+
304
308
chai@^4.1.2 :
305
309
version "4.1.2"
306
310
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
You can’t perform that action at this time.
0 commit comments