From 6d8fe38ac8b942841e2e64ee8fdb04f0b11eaf5c Mon Sep 17 00:00:00 2001 From: Tom Keller <1083460+kellertk@users.noreply.github.com> Date: Fri, 4 Nov 2022 16:37:47 -0700 Subject: [PATCH] Kellertk/packaging fix (#566) * fix: packaging test failure The tests fail if there are credentials available in the env, so we need to get the AWS credentials *after* the package step. * chore: remove unnecessary environment manipulation --- index.test.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.test.js b/index.test.js index 7b6e3af..f1e1bc5 100644 --- a/index.test.js +++ b/index.test.js @@ -77,11 +77,9 @@ jest.mock('axios', () => ({ })); describe('Configure AWS Credentials', () => { - const OLD_ENV = process.env; - beforeEach(() => { jest.resetModules(); - process.env = {...OLD_ENV, ...ENVIRONMENT_VARIABLE_OVERRIDES}; + process.env = { ...ENVIRONMENT_VARIABLE_OVERRIDES }; jest.clearAllMocks(); @@ -163,7 +161,6 @@ describe('Configure AWS Credentials', () => { }); afterEach(() => { - process.env = OLD_ENV; reset(); });