diff --git a/jest.config.js b/jest.config.js index ca75fa4..ebceda6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,5 +3,6 @@ module.exports = { '^.+\\.ts$': 'ts-jest' }, testPathIgnorePatterns: ['/node_modules/', '/lib/'], - collectCoverageFrom: ['src/*'] + collectCoverageFrom: ['src/*'], + setupFiles: ['./jest.setup-env.js'] } diff --git a/jest.setup-env.js b/jest.setup-env.js new file mode 100644 index 0000000..57daa43 --- /dev/null +++ b/jest.setup-env.js @@ -0,0 +1,5 @@ +// Mock values for aws access keys, so that aws-sdk does not try to fetch +// credential data from instance metadata endpoints during test ececutions + +process.env.AWS_ACCESS_KEY_ID = 'AKIAMOCKEDKEY' +process.env.AWS_SECRET_ACCESS_KEY = 'this-does-not-matter'