Skip to content

Commit e2a6745

Browse files
committed
Fix FileReporterSpec tests
1 parent d5ddabd commit e2a6745

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/reporter/__tests__/FileReporterSpec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
jest.mock('fs');
2+
13
import Reporter from '../FileReporter';
24
import path from 'path';
35
import fs from 'fs';
@@ -149,6 +151,9 @@ describe('FileReporter', () => {
149151
path.join(config.reportPath, 'name.json'),
150152
JSON.stringify({ name: 'name', errors, scenario }, null, '\t')
151153
);
154+
fs.existsSync.mockRestore();
155+
fs.mkdirSync.mockRestore();
156+
fs.writeFileSync.mockRestore();
152157
});
153158

154159
it('can get scenario name', () => {

0 commit comments

Comments
 (0)