File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 24
24
"expect.js" : " 0.3.1" ,
25
25
"mocha" : " 2.4.5" ,
26
26
"mocks" : " 0.0.15" ,
27
- "proxy" : " ^0.2.4"
27
+ "proxy" : " ^0.2.4" ,
28
+ "rimraf" : " ^2.5.4"
28
29
},
29
30
"bugs" : " https://github.com/browserstack/browserstack-local-nodejs/issues" ,
30
31
"homepage" : " https://github.com/browserstack/browserstack-local-nodejs" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ var expect = require('expect.js'),
2
2
mocks = require ( 'mocks' ) ,
3
3
path = require ( 'path' ) ,
4
4
fs = require ( 'fs' ) ,
5
+ rimraf = require ( 'rimraf' ) ,
5
6
Proxy = require ( 'proxy' ) ,
6
7
browserstack = require ( '../index' ) ,
7
8
LocalBinary = require ( '../lib/LocalBinary' ) ;
@@ -181,15 +182,14 @@ describe('LocalBinary', function () {
181
182
} ) ;
182
183
183
184
afterEach ( function ( ) {
184
- fs . rmdirSync ( tempDownloadPath ) ;
185
+ rimraf . sync ( tempDownloadPath ) ;
185
186
} ) ;
186
187
187
188
it ( 'should download binaries without proxy' , function ( done ) {
188
189
this . timeout ( 600000 ) ;
189
190
var conf = { } ;
190
191
binary . download ( conf , tempDownloadPath , function ( result ) {
191
192
expect ( fs . existsSync ( result ) ) . to . equal ( true ) ;
192
- fs . unlinkSync ( result ) ;
193
193
done ( ) ;
194
194
} ) ;
195
195
} ) ;
@@ -203,7 +203,6 @@ describe('LocalBinary', function () {
203
203
binary . download ( conf , tempDownloadPath , function ( result ) {
204
204
// test for file existence
205
205
expect ( fs . existsSync ( result ) ) . to . equal ( true ) ;
206
- fs . unlinkSync ( result ) ;
207
206
done ( ) ;
208
207
} ) ;
209
208
} ) ;
You can’t perform that action at this time.
0 commit comments