Skip to content

Commit

Permalink
feat: add catch block in test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjibansg committed Dec 7, 2023
1 parent 7a1f71f commit 5a175bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/generate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ test('CLI generates correct SVG file', () => {
const expectedSvgContent = fs.readFileSync('test/expected.svg', 'utf-8');
expect(outputSvgContent).toEqual(expectedSvgContent);

} catch (error) {
fail(`Test failed: ${error.message}`);
} finally {
fs.unlinkSync('plan.svg');
}
Expand Down

0 comments on commit 5a175bd

Please sign in to comment.