Skip to content

Commit

Permalink
feat(#10): if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed May 22, 2024
1 parent e794eeb commit cc6700d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/to-json.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const assert = require('assert');
describe('Test case for to-json.js', () => {
afterEach(
() => {
fs.unlinkSync('test.json');
if (fs.existsSync('test.json')) {
fs.unlinkSync('test.json');
}
}
);
it('creates .json file and writes results as JSON', function() {
Expand Down

0 comments on commit cc6700d

Please sign in to comment.