File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -204,13 +204,10 @@ describe('lib', () => {
204
204
205
205
it ( 'should change the contents of a file' , async ( ) => {
206
206
const expected = 'somefilecontents\nmorecontents\n'
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
- ) ;
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 )
214
211
} )
215
212
216
213
after ( async ( ) => {
You can’t perform that action at this time.
0 commit comments