From 48c4fbfd69449aa2eeb66131805d868db64e195b Mon Sep 17 00:00:00 2001 From: skewl84 <6488629+skewl84@users.noreply.github.com> Date: Wed, 5 May 2021 14:51:41 +1000 Subject: [PATCH] Fix the integration test related to the CORS issue on the API Fix the integration test related to the CORS issue on the API --- integration_test/test_service.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration_test/test_service.test.ts b/integration_test/test_service.test.ts index c92f4559..bf39cf1a 100644 --- a/integration_test/test_service.test.ts +++ b/integration_test/test_service.test.ts @@ -1,5 +1,8 @@ import axios from 'axios'; +// Fix CORS on API assuming APIGateway has been implemented as described at https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html +axios.defaults.adapter = require('axios/lib/adapters/http'); + test('200 Response', async () => { console.log('env ->', process.env);