From 3565dce3343f57595d5156757b66196521095b5a Mon Sep 17 00:00:00 2001 From: Daniel Tschinder <231804+danez@users.noreply.github.com> Date: Mon, 29 Aug 2022 14:23:03 +0200 Subject: [PATCH] chore: fix nit from review --- tests/integration/0.command.dev.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/0.command.dev.test.js b/tests/integration/0.command.dev.test.js index 4c32d55eab7..f4fdeca02ed 100644 --- a/tests/integration/0.command.dev.test.js +++ b/tests/integration/0.command.dev.test.js @@ -217,7 +217,7 @@ test('should follow 301 redirect to an external server', async (t) => { }) }) -test('should rewrite POST request if content-type is missing', async (t) => { +test('should rewrite POST request if content-type is missing and not crash dev server', async (t) => { await withSiteBuilder('site-with-post-no-content-type', async (builder) => { builder.withNetlifyToml({ config: { @@ -237,8 +237,8 @@ test('should rewrite POST request if content-type is missing', async (t) => { }), ) - // we're testing Netlify Dev didn't crash - t.is(error.message, 'Response code 405 (Method Not Allowed)') + // Method Not Allowed + t.is(error.response.statusCode, 405) }) }) })