Skip to content
This repository was archived by the owner on Oct 2, 2022. It is now read-only.

Commit 351c517

Browse files
committed
build: update Jest and lint-staged configurations
1 parent 6dc84af commit 351c517

File tree

2 files changed

+6
-27
lines changed

2 files changed

+6
-27
lines changed

.lintstagedrc.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
linters:
2-
"src/**/*.ts":
3-
- "tslint --fix" # Run TSLint
4-
- "prettier --write" # Run Prettier
5-
- "jest --bail --findRelatedTests" # Run tests
6-
- "git add"
7-
ignore:
8-
- "**/__fixtures__/error.ts"
1+
"src/**/*.ts":
2+
- "tslint --fix" # Run TSLint
3+
- "prettier --write" # Run Prettier
4+
- "jest --bail --findRelatedTests" # Run tests
5+
- "git add"

jest.config.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
const preset = require('ts-jest').jestPreset;
2-
31
module.exports = {
42
preset: 'ts-jest',
5-
collectCoverage: false,
3+
testEnvironment: 'node',
64
coveragePathIgnorePatterns: [
75
'/node_modules/',
86
'/tests/',
@@ -13,24 +11,8 @@ module.exports = {
1311
tsConfig: "tsconfig.test.json",
1412
},
1513
},
16-
// @TODO Uncomment the following lines once test coverage has reached an acceptable threshold
17-
// 'coverageThreshold': {
18-
// 'global': {
19-
// 'branches': 90,
20-
// 'functions': 95,
21-
// 'lines': 95,
22-
// 'statements': 95
23-
// }
24-
// },
2514
moduleDirectories: [
2615
'src',
2716
'node_modules',
2817
],
29-
testMatch: [
30-
...preset.testMatch,
31-
'**/?(*.)+(spec|integ|test).ts?(x)',
32-
],
33-
transformIgnorePatterns: [
34-
'<rootDir>/node_modules/',
35-
],
3618
};

0 commit comments

Comments
 (0)