From fb8d9ea93cfdd41fa3fc2e5dcb9d787da818f8cf Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Thu, 25 Jul 2024 09:39:30 +0100 Subject: [PATCH] test: update failure messages for clarity --- tests/integration/edge-handler.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/edge-handler.test.ts b/tests/integration/edge-handler.test.ts index 9353ca4415..9ca3a633aa 100644 --- a/tests/integration/edge-handler.test.ts +++ b/tests/integration/edge-handler.test.ts @@ -269,7 +269,7 @@ describe("aborts middleware execution when the matcher conditions don't match th }) expect( response.headers.has('x-hello-from-middleware-res'), - `does not match ${path}`, + `should match ${path}`, ).toBeTruthy() expect(await response.text()).toBe('Hello from origin!') expect(response.status).toBe(200) @@ -281,7 +281,10 @@ describe("aborts middleware execution when the matcher conditions don't match th origin, url: path, }) - expect(response.headers.has('x-hello-from-middleware-res'), `does match ${path}`).toBeFalsy() + expect( + response.headers.has('x-hello-from-middleware-res'), + `should not match ${path}`, + ).toBeFalsy() expect(await response.text()).toBe('Hello from origin!') expect(response.status).toBe(200) }