Skip to content

Commit 0d5f09e

Browse files
committed
Unit tests for TS Lambda client
1 parent f9f55da commit 0d5f09e

File tree

6 files changed

+596
-10
lines changed

6 files changed

+596
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cdk.context.json
99
!jest.config.js
1010
*.d.ts
1111
node_modules
12+
coverage/
1213

1314
# Python
1415
__pycache__/

src/typescript/jest.config.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,25 @@ export default {
77
...defaultEsmPreset,
88
moduleNameMapper: {
99
"^(\\.{1,2}/.*)\\.js$": "$1",
10-
"^pkce-challenge$": "<rootDir>/src/__mocks__/pkce-challenge.ts"
10+
"^pkce-challenge$": "<rootDir>/src/__mocks__/pkce-challenge.ts",
1111
},
12-
transformIgnorePatterns: [
13-
"/node_modules/(?!eventsource)/"
14-
],
12+
transformIgnorePatterns: ["/node_modules/(?!eventsource)/"],
1513
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
14+
collectCoverage: true,
15+
coverageDirectory: "coverage",
16+
coverageReporters: ["html"],
17+
collectCoverageFrom: [
18+
"src/**/*.ts",
19+
"!src/**/*.d.ts",
20+
"!src/**/*.test.ts",
21+
"!src/__mocks__/**",
22+
],
23+
coverageThreshold: {
24+
global: {
25+
branches: 80,
26+
functions: 90,
27+
lines: 90,
28+
statements: 90,
29+
},
30+
},
1631
};

0 commit comments

Comments
 (0)