@@ -5,43 +5,43 @@ import * as rimraf from "rimraf";
55import { FileSystem } from "../../lib/wrappers/file-system" ;
66
77describe ( 'FileSystem' , ( ) => {
8- describe ( 'extractZip' , ( ) => {
9- const d = new Date ( ) ;
10- const datetime = [
11- d . getFullYear ( ) ,
12- d . getMonth ( ) + 1 ,
13- d . getDate ( ) ,
14- d . getHours ( ) ,
15- d . getMinutes ( ) ,
16- d . getSeconds ( ) ,
17- d . getMilliseconds ( )
18- ] . join ( '' ) ;
19- const tmpDir = `${ tmpdir ( ) } /${ datetime } ` ;
20- const testFilePath = `${ __dirname } /example.zip` ;
21- const filesThatNeedToExtsit = [
22- `${ tmpDir } /test/android-local-build-requirements.ts` ,
23- `${ tmpDir } /test/android-tools-info.ts` ,
24- `${ tmpDir } /test/ios-local-build-requirements.ts` ,
25- `${ tmpDir } /test/sys-info.ts` ,
26- `${ tmpDir } /test/wrappers/file-system.ts`
27- ] ;
8+ describe ( 'extractZip' , ( ) => {
9+ const d = new Date ( ) ;
10+ const datetime = [
11+ d . getFullYear ( ) ,
12+ d . getMonth ( ) + 1 ,
13+ d . getDate ( ) ,
14+ d . getHours ( ) ,
15+ d . getMinutes ( ) ,
16+ d . getSeconds ( ) ,
17+ d . getMilliseconds ( )
18+ ] . join ( '' ) ;
19+ const tmpDir = `${ tmpdir ( ) } /${ datetime } ` ;
20+ const testFilePath = `${ __dirname } /example.zip` ;
21+ const filesThatNeedToExtsit = [
22+ `${ tmpDir } /test/android-local-build-requirements.ts` ,
23+ `${ tmpDir } /test/android-tools-info.ts` ,
24+ `${ tmpDir } /test/ios-local-build-requirements.ts` ,
25+ `${ tmpDir } /test/sys-info.ts` ,
26+ `${ tmpDir } /test/wrappers/file-system.ts`
27+ ] ;
2828
29- it ( 'should extract in example zip archive in tmp folder' , done => {
30- const fs = new FileSystem ( ) ;
29+ it ( 'should extract in example zip archive in tmp folder' , done => {
30+ const fs = new FileSystem ( ) ;
3131
32- fs . extractZip ( testFilePath , tmpDir )
33- . then ( ( ) => {
34- const allExists = filesThatNeedToExtsit
35- . map ( fs . exists )
36- . reduce ( ( acc , r ) => acc && r , true ) ;
32+ fs . extractZip ( testFilePath , tmpDir )
33+ . then ( ( ) => {
34+ const allExists = filesThatNeedToExtsit
35+ . map ( fs . exists )
36+ . reduce ( ( acc , r ) => acc && r , true ) ;
3737
38- assert . isTrue ( allExists ) ;
38+ assert . isTrue ( allExists ) ;
3939
40- done ( ) ;
41- } )
42- . catch ( e => done ( e ) ) ;
43- } ) ;
40+ done ( ) ;
41+ } )
42+ . catch ( e => done ( e ) ) ;
43+ } ) ;
4444
45- afterEach ( done => rimraf ( tmpDir , done ) ) ;
46- } ) ;
45+ afterEach ( done => rimraf ( tmpDir , done ) ) ;
46+ } ) ;
4747} ) ;
0 commit comments