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 2424 "expect.js" : " 0.3.1" ,
2525 "mocha" : " 2.4.5" ,
2626 "mocks" : " 0.0.15" ,
27- "proxy" : " ^0.2.4"
27+ "proxy" : " ^0.2.4" ,
28+ "rimraf" : " ^2.5.4"
2829 },
2930 "bugs" : " https://github.com/browserstack/browserstack-local-nodejs/issues" ,
3031 "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'),
22 mocks = require ( 'mocks' ) ,
33 path = require ( 'path' ) ,
44 fs = require ( 'fs' ) ,
5+ rimraf = require ( 'rimraf' ) ,
56 Proxy = require ( 'proxy' ) ,
67 browserstack = require ( '../index' ) ,
78 LocalBinary = require ( '../lib/LocalBinary' ) ;
@@ -181,15 +182,14 @@ describe('LocalBinary', function () {
181182 } ) ;
182183
183184 afterEach ( function ( ) {
184- fs . rmdirSync ( tempDownloadPath ) ;
185+ rimraf . sync ( tempDownloadPath ) ;
185186 } ) ;
186187
187188 it ( 'should download binaries without proxy' , function ( done ) {
188189 this . timeout ( 600000 ) ;
189190 var conf = { } ;
190191 binary . download ( conf , tempDownloadPath , function ( result ) {
191192 expect ( fs . existsSync ( result ) ) . to . equal ( true ) ;
192- fs . unlinkSync ( result ) ;
193193 done ( ) ;
194194 } ) ;
195195 } ) ;
@@ -203,7 +203,6 @@ describe('LocalBinary', function () {
203203 binary . download ( conf , tempDownloadPath , function ( result ) {
204204 // test for file existence
205205 expect ( fs . existsSync ( result ) ) . to . equal ( true ) ;
206- fs . unlinkSync ( result ) ;
207206 done ( ) ;
208207 } ) ;
209208 } ) ;
You can’t perform that action at this time.
0 commit comments