diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index b4e24e5..0000000 --- a/jest.config.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2024, salesforce.com, inc. - * All rights reserved. - * SPDX-License-Identifier: MIT - * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT - */ - -export default { - displayName: 'Unit Tests', - setupFilesAfterEnv: ['jest-extended', 'jest-chain'], - preset: 'ts-jest', - testMatch: [ - '/test/plugin.ts', - '/test/rules/**/*.ts', - '!**/test/rules/shared.ts' - ], - moduleFileExtensions: ['ts', 'js', 'json'], - testResultsProcessor: 'jest-sonar-reporter', - testPathIgnorePatterns: ['/node_modules/', '/lib/'], - moduleDirectories: ['node_modules'], - collectCoverage: true, - collectCoverageFrom: ['src/**/*.ts'], - coverageDirectory: 'reports/coverage', - reporters: [ - 'default', - [ - 'jest-junit', - { - suiteName: 'Unit Tests', - output: './reports/junit/jest-results.xml' - } - ] - ] -}; diff --git a/jest.config.json b/jest.config.json new file mode 100644 index 0000000..7899bdb --- /dev/null +++ b/jest.config.json @@ -0,0 +1,27 @@ +{ + "displayName": "Unit Tests", + "setupFilesAfterEnv": ["jest-extended", "jest-chain"], + "preset": "ts-jest", + "testMatch": [ + "/test/plugin.ts", + "/test/rules/**/*.ts", + "!**/test/rules/shared.ts" + ], + "moduleFileExtensions": ["ts", "js", "json"], + "testResultsProcessor": "jest-sonar-reporter", + "testPathIgnorePatterns": ["/node_modules/", "/lib/"], + "moduleDirectories": ["node_modules"], + "collectCoverage": true, + "collectCoverageFrom": ["src/**/*.ts"], + "coverageDirectory": "reports/coverage", + "reporters": [ + "default", + [ + "jest-junit", + { + "suiteName": "Unit Tests", + "output": "./reports/junit/jest-results.xml" + } + ] + ] +}