File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ function testWriteAndReadFile() {
51
51
. then ( ( contents ) => {
52
52
updateMessage ( 'FILE READ! Contents:' ) ;
53
53
readText = contents ;
54
- updateMessage ( readText ) ;
55
54
expectEqual ( text , readText , 'testWriteAndReadFile' ) ;
55
+ updateMessage ( 'readFile correctly returned' + readText ) ;
56
+ } )
57
+ . finally ( ( ) => {
56
58
runTestCase ( 'testCreateAndDeleteFile' , testCreateAndDeleteFile ) ;
57
59
} )
58
- . catch ( ( err ) => {
59
- updateMessage ( err . message , err . code ) ;
60
- } ) ;
60
+ . done ( ) ; //promise done needed to throw exception so that in case test fails,error is propagated
61
61
}
62
62
63
63
@@ -84,9 +84,12 @@ function testCreateAndDeleteFile() {
84
84
} )
85
85
. catch ( ( err ) => {
86
86
updateMessage ( 'catch' + err ) ;
87
- expectTrue ( true , 'File is deleted' ) ;
88
- done ( ) ;
89
- } ) ;
87
+ expectTrue ( true , 'File is deleted' ) ;
88
+ } )
89
+ . finally ( ( ) => {
90
+ done ( ) ; //testrunners done
91
+ } )
92
+ . done ( ) ; //promise done needed to throw exception so that in case test fails,error is propagated
90
93
}
91
94
92
95
You can’t perform that action at this time.
0 commit comments