Skip to content

Commit aaa5403

Browse files
committed
chore(test): add jest setup
1 parent 46c010b commit aaa5403

5 files changed

Lines changed: 5283 additions & 1003 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ build/
33
.env
44
logs/
55
*.log
6+
reports
7+
**/test-report.xml

jest.config.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
export default {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
collectCoverage: false,
6+
collectCoverageFrom: ['src/**/*.ts'],
7+
coverageDirectory: 'reports/coverage',
8+
coverageReporters: ['text', 'text-summary', 'lcov'],
9+
reporters: [
10+
'default',
11+
[
12+
'jest-junit',
13+
{
14+
outputDirectory: 'reports',
15+
outputName: 'test-results.xml'
16+
}
17+
],
18+
],
19+
testMatch: ['**/tests/**/*.test.ts'],
20+
coveragePathIgnorePatterns: ['index.ts'],
21+
testResultsProcessor: 'jest-sonar-reporter'
22+
}

0 commit comments

Comments
 (0)