File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -204,10 +204,13 @@ describe('lib', () => {
204
204
205
205
it ( 'should change the contents of a file' , async ( ) => {
206
206
const expected = 'somefilecontents\nmorecontents\n'
207
- await fs . setFileContents ( 'text_file_for_test.txt' , expected )
208
- const fileContents = await realFs . promises . readFile ( filePath , 'utf8' )
209
- const realFileContents = fileContents . replace ( / \r / g, '' )
210
- expect ( realFileContents ) . to . equal ( expected )
207
+ fs . setFileContents ( 'text_file_for_test.txt' , expected ) . then ( ( ) => {
208
+ const fileContents = await realFs . promises . readFile ( filePath , 'utf8' )
209
+ const realFileContents = fileContents . replace ( / \r / g, '' )
210
+ expect ( realFileContents ) . to . equal ( expected )
211
+ } ) . catch (
212
+ //TODO: raise exception....
213
+ ) ;
211
214
} )
212
215
213
216
after ( async ( ) => {
You can’t perform that action at this time.
0 commit comments