From 2b9e8fb69e48229ee5580b6c313aa4a0b7d17dca Mon Sep 17 00:00:00 2001 From: Cole Peters Date: Mon, 6 May 2024 14:02:55 -0500 Subject: [PATCH] Update redirect test --- test/backend/redirect-map-test.mjs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/test/backend/redirect-map-test.mjs b/test/backend/redirect-map-test.mjs index add7f6de..2387e13f 100644 --- a/test/backend/redirect-map-test.mjs +++ b/test/backend/redirect-map-test.mjs @@ -4,7 +4,7 @@ import test from 'tape' import { redirect, tempRedirects, permanentRedirects } from '../../src/shared/redirect-map.mjs' test('redirect map middleware', async t => { - t.plan(5) + t.plan(4) t.equal(typeof redirect, 'function', 'Redirect middleware is a function') @@ -24,22 +24,6 @@ test('redirect map middleware', async t => { } t.deepEqual(redirectResponse, expectedResponse, 'Correctly redirect permanent mapped path') - const tempRedirectResponse = await redirect({ - requestContext: { - http: { - method: 'GET', - path: '/', - } - } - }) - const expectedTempResponse = { - statusCode: 302, - headers: { - location: '/docs/en/get-started/quickstart', - }, - } - t.deepEqual(tempRedirectResponse, expectedTempResponse, 'Correctly redirect temporary mapped path') - const nonRedirectResponse = await redirect({ requestContext: { http: {