From 69a1a03b4a5d360bbc2a0566e3e3ef53c0340813 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 24 Oct 2023 17:30:32 +0800 Subject: [PATCH] Fix incorrect netlify redirect test (#39) --- packages/netlify/test/functions/redirects.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/netlify/test/functions/redirects.test.js b/packages/netlify/test/functions/redirects.test.js index 855378ad4..ce3042ed7 100644 --- a/packages/netlify/test/functions/redirects.test.js +++ b/packages/netlify/test/functions/redirects.test.js @@ -40,11 +40,12 @@ describe('SSG - Redirects', () => { }); it('Does not create .html files', async () => { + let hasErrored = false; try { await fixture.readFile('/other/index.html'); - expect(false).to.equal(true, 'this file should not exist'); } catch { - expect(true).to.equal(true); + hasErrored = true; } + expect(hasErrored).to.equal(true, 'this file should not exist'); }); });