From 5a175bd271b95b7f32808ee561603860ab1a9699 Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Fri, 8 Dec 2023 03:49:34 +0530 Subject: [PATCH] feat: add catch block in test --- test/generate.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/generate.test.js b/test/generate.test.js index 9264ade..b8d4f30 100644 --- a/test/generate.test.js +++ b/test/generate.test.js @@ -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'); }