Skip to content

Commit c55fd21

Browse files
committed
add tests
1 parent 434e74c commit c55fd21

4 files changed

Lines changed: 317 additions & 51 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: 22
19+
node-version: 20
2020

2121
- name: Install dependencies and build
2222
run: |

jest.config.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,46 @@ module.exports = {
33
name: 'Evernorth Typescript Library: aws-lambda-ts-event-handler',
44
color: 'yellow',
55
},
6-
'runner': 'groups',
7-
'preset': 'ts-jest',
8-
'transform': {
6+
runner: 'groups',
7+
preset: 'ts-jest',
8+
transform: {
99
'^.+\\.ts?$': 'ts-jest',
1010
},
1111
moduleFileExtensions: ['js', 'ts'],
12-
'collectCoverage': true,
13-
'collectCoverageFrom': [
14-
'src/**/*.ts',
15-
'!**/node_modules/**',
16-
],
17-
'testMatch': ['**/?(*.)+(spec|test).ts'],
18-
'roots': [
19-
'src',
20-
'tests',
21-
],
22-
'testPathIgnorePatterns': [
23-
'/node_modules/',
24-
25-
],
26-
'testEnvironment': 'node',
27-
'coveragePathIgnorePatterns': [
12+
collectCoverage: true,
13+
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**'],
14+
testMatch: ['**/?(*.)+(spec|test).ts'],
15+
roots: ['src', 'tests'],
16+
testPathIgnorePatterns: ['/node_modules/'],
17+
testEnvironment: 'node',
18+
coveragePathIgnorePatterns: [
2819
'/node_modules/',
2920
'src/helpers/TestServer.ts',
3021
// '/types/',
3122
],
32-
'coverageThreshold': {
33-
'global': {
34-
'statements': 85,
35-
'branches': 85,
36-
'functions': 85,
37-
'lines': 85,
23+
coverageThreshold: {
24+
global: {
25+
statements: 85,
26+
branches: 85,
27+
functions: 85,
28+
lines: 85,
3829
},
3930
},
40-
'coverageReporters': [
41-
'json-summary',
42-
'text',
43-
'lcov'
44-
],
31+
coverageReporters: ['json-summary', 'text', 'lcov'],
4532
// 'setupFiles': [
4633
// '<rootDir>/tests/helpers/populateEnvironmentVariables.ts'
4734
// ]
48-
};
35+
36+
// Fix for GitHub Actions compatibility issue
37+
resolver: undefined,
38+
// Ensure consistent module resolution in different environments
39+
moduleDirectories: ['node_modules'],
40+
// Improve error reporting
41+
verbose: true,
42+
// Add GitHub Actions reporter when running in GitHub Actions
43+
reporters: [
44+
'default',
45+
process.env.GITHUB_ACTIONS === 'true' ? 'github-actions' : null,
46+
process.env.GITHUB_ACTIONS === 'true' ? 'summary' : null,
47+
].filter(Boolean),
48+
};

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@
4141
"node": ">=12"
4242
},
4343
"devDependencies": {
44-
"@types/aws-lambda": "^8.10.147",
45-
"@types/jest": "^29.5.14",
46-
"@types/node": "^22.13.9",
44+
"@types/aws-lambda": "^8.10.152",
45+
"@types/jest": "^30.0.0",
46+
"@types/node": "^24.1.0",
4747
"@types/uuid": "^10.0.0",
48-
"@typescript-eslint/eslint-plugin": "^8.26.0",
49-
"@typescript-eslint/parser": "^8.26.0",
50-
"ava": "^6.2.0",
48+
"@typescript-eslint/eslint-plugin": "^8.38.0",
49+
"@typescript-eslint/parser": "^8.38.0",
50+
"ava": "^6.4.1",
5151
"codecov": "^3.8.3",
52-
"cspell": "^8.17.5",
52+
"cspell": "^9.2.0",
5353
"cz-conventional-changelog": "^3.3.0",
54-
"eslint": "^9.22.0",
55-
"eslint-config-prettier": "^9.1.0",
54+
"eslint": "^9.31.0",
55+
"eslint-config-prettier": "^10.1.8",
5656
"eslint-import-resolver-node": "^0.3.9",
57-
"eslint-import-resolver-typescript": "^3.8.3",
58-
"eslint-plugin-import": "^2.31.0",
59-
"eslint-plugin-prettier": "^5.2.3",
57+
"eslint-import-resolver-typescript": "^4.4.4",
58+
"eslint-plugin-import": "^2.32.0",
59+
"eslint-plugin-prettier": "^5.5.3",
6060
"eslint-plugin-sort-exports": "^0.9.1",
61-
"jest": "^29.7.0",
61+
"jest": "^30.0.5",
6262
"jest-runner-groups": "^2.2.0",
6363
"npm-run-all": "^4.1.5",
64-
"prettier": "^3.5.3",
65-
"prettier-eslint": "^16.3.0",
64+
"prettier": "^3.6.2",
65+
"prettier-eslint": "^16.4.2",
6666
"promptly": "^3.2.0",
6767
"proxy-agent": "^6.5.0",
68-
"ts-jest": "^29.2.6",
68+
"ts-jest": "^29.4.0",
6969
"ts-node": "^10.9.2",
70-
"typedoc": "^0.27.9",
71-
"typedoc-plugin-missing-exports": "^3.1.0",
72-
"typescript": "^5.8.2"
70+
"typedoc": "^0.28.7",
71+
"typedoc-plugin-missing-exports": "^4.0.0",
72+
"typescript": "^5.8.3"
7373
},
7474
"files": [
7575
"lib/**/*"

0 commit comments

Comments
 (0)