diff --git a/jest.config.js b/jest.config.js index e8864d2..9cc9844 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,12 @@ const generateProject = (name) => { return { displayName: name, transform: { - '^.+\\.tsx?$': 'ts-jest', + '^.+\\.tsx?$': [ + 'ts-jest', + { + isolatedModules: true, + }, + ], }, testMatch: [`/${name}/**/*.test.ts`], setupFilesAfterEnv: [`./${name}/jest.setup.js`], @@ -12,5 +17,5 @@ const generateProject = (name) => { module.exports = { verbose: true, testEnvironment: 'node', - projects: ['cdk', 'ingestion-lambda'].map(generateProject), + projects: ['cdk', 'ingestion-lambda', 'poller-lambdas'].map(generateProject), }; diff --git a/poller-lambdas/jest.setup.js b/poller-lambdas/jest.setup.js new file mode 100644 index 0000000..e69de29 diff --git a/poller-lambdas/package.json b/poller-lambdas/package.json index d32f8b5..6020f94 100644 --- a/poller-lambdas/package.json +++ b/poller-lambdas/package.json @@ -7,7 +7,8 @@ "typecheck": "tsc -noEmit", "build": "esbuild src/index.ts --bundle --minify --outfile=dist/index.js --external:@aws-sdk --external:aws-sdk --platform=node", "lint": "eslint src/** --ext .ts --no-error-on-unmatched-pattern --fix", - "lint:ci": "eslint src/** --ext .ts --no-error-on-unmatched-pattern" + "lint:ci": "eslint src/** --ext .ts --no-error-on-unmatched-pattern", + "test": "jest --detectOpenHandles --config ../jest.config.js --selectProjects poller-lambdas" }, "dependencies": {}, "devDependencies": { diff --git a/poller-lambdas/src/test.test.ts b/poller-lambdas/src/test.test.ts new file mode 100644 index 0000000..2902a74 --- /dev/null +++ b/poller-lambdas/src/test.test.ts @@ -0,0 +1,5 @@ +describe('test', () => { + it('should pass', () => { + expect(true).toBe(true); + }); +});