Skip to content

Commit a217600

Browse files
fix: in then catch
Signed-off-by: Scott Schreckengaust <[email protected]>
1 parent 6044eed commit a217600

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/lib/file_system_tests.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ describe('lib', () => {
204204

205205
it('should change the contents of a file', async () => {
206206
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+
);
211214
})
212215

213216
after(async () => {

0 commit comments

Comments
 (0)