Skip to content

Commit

Permalink
update jest config
Browse files Browse the repository at this point in the history
  • Loading branch information
haifeng-li-at-salesforce committed May 10, 2024
1 parent 31779e4 commit bcf4191
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
27 changes: 0 additions & 27 deletions jest.config.json

This file was deleted.

31 changes: 31 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { Config } from 'jest';

const config: Config = {
displayName: 'Unit Tests',
setupFilesAfterEnv: ['jest-extended', 'jest-chain'],
preset: 'ts-jest',
testMatch: [
'<rootDir>/test/plugin.ts',
'<rootDir>/test/rules/**/*.ts',
'!**/test/rules/shared.ts'
],
moduleFileExtensions: ['ts', 'js', 'json'],
testResultsProcessor: 'jest-sonar-reporter',
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/lib/'],
moduleDirectories: ['node_modules'],
collectCoverage: true,
collectCoverageFrom: ['lib/**/*.ts'],
coverageDirectory: 'reports/coverage',
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'Unit Tests',
output: './reports/junit/jest-results.xml'
}
]
]
};

export default config;

0 comments on commit bcf4191

Please sign in to comment.