File tree 3 files changed +712
-772
lines changed
3 files changed +712
-772
lines changed Original file line number Diff line number Diff line change 23
23
"test" : " npm run mocha && npm run lint"
24
24
},
25
25
"devDependencies" : {
26
- "bluebird" : " ^3.5.0 " ,
27
- "chai" : " ^3.5 .0" ,
26
+ "bluebird" : " ^3.7.2 " ,
27
+ "chai" : " ^4.2 .0" ,
28
28
"dotenv-cli" : " ^3.1.0" ,
29
- "eslint" : " ^3.17.1 " ,
30
- "lodash" : " ^4.17.4 " ,
31
- "mocha" : " ^3.2.0 " ,
32
- "mock-require" : " ^2 .0.1 " ,
29
+ "eslint" : " ^6.8.0 " ,
30
+ "lodash" : " ^4.17.15 " ,
31
+ "mocha" : " ^7.1.2 " ,
32
+ "mock-require" : " ^3 .0.3 " ,
33
33
"release-it" : " ^13.5.1" ,
34
34
"release-it-lerna-changelog" : " ^2.1.2" ,
35
- "sinon" : " ^1.17.7 "
35
+ "sinon" : " ^9.0.2 "
36
36
},
37
37
"publishConfig" : {
38
38
"registry" : " https://registry.npmjs.org"
Original file line number Diff line number Diff line change @@ -6,19 +6,17 @@ const { join, resolve } = require('path');
6
6
const subject = require ( '../../lib/handler' ) ;
7
7
8
8
describe ( 'handler' , ( ) => {
9
- let sandbox ;
10
9
let mockFiles ;
11
10
let mockDirs ;
12
11
13
12
before ( ( ) => {
14
- sandbox = sinon . sandbox . create ( ) ;
15
13
// Stub accessSync to act like only files in mockFiles exist
16
- sandbox . stub ( fs , 'accessSync' , path => {
14
+ sinon . stub ( fs , 'accessSync' ) . callsFake ( path => {
17
15
if ( mockFiles . indexOf ( path ) === - 1 && mockDirs . indexOf ( path ) === - 1 ) {
18
16
throw new Error ( 'Doesn\'t exist' ) ;
19
17
}
20
18
} ) ;
21
- sandbox . stub ( fs , 'statSync' , path => ( {
19
+ sinon . stub ( fs , 'statSync' ) . callsFake ( path => ( {
22
20
isFile ( ) {
23
21
return mockFiles . indexOf ( path ) !== - 1 ;
24
22
} ,
@@ -29,7 +27,7 @@ describe('handler', () => {
29
27
} ) ;
30
28
31
29
after ( ( ) => {
32
- sandbox . restore ( ) ;
30
+ sinon . restore ( ) ;
33
31
} ) ;
34
32
35
33
beforeEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments