mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:30:44 +00:00
1167ac80d7
## Description: Added a command "npm run test:coverage" This could be added to the CI/CD to check if a pull request induced regressions, and if it added propers tests. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: theodoreleon.aetarax
31 lines
737 B
TypeScript
31 lines
737 B
TypeScript
export default {
|
|
testEnvironment: "node",
|
|
testRegex: "/tests/.*\\.(test|spec)?\\.(ts|tsx)$",
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
extensionsToTreatAsEsm: [".ts"],
|
|
moduleNameMapper: {
|
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
|
},
|
|
transform: {
|
|
"^.+\\.tsx?$": [
|
|
"ts-jest",
|
|
{
|
|
useESM: true,
|
|
tsconfig: "tsconfig.jest.json",
|
|
},
|
|
],
|
|
},
|
|
transformIgnorePatterns: ["node_modules/(?!(node:)/)"],
|
|
preset: "ts-jest/presets/default-esm",
|
|
collectCoverageFrom: ["src/**/*.ts", "!src/**/*.d.ts"],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 0,
|
|
functions: 0,
|
|
lines: 0,
|
|
statements: 0,
|
|
},
|
|
},
|
|
coverageReporters: ["text", "lcov", "html"],
|
|
};
|