Skip to content

Commit

Permalink
Ensure lint runs on src folder, narrow Jest test discovery
Browse files Browse the repository at this point in the history
Jest would catch test files outside the test folder if named correctly. Unlikely, but possible
  • Loading branch information
linuswillner committed Jan 24, 2024
1 parent 0b712bc commit 6e9207a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
testEnvironment: 'node',
testRegex: 'test/.*\\.test\\.ts$'
}
3 changes: 2 additions & 1 deletion jest.coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ module.exports = {
'<rootDir>/node_modules/'
],
preset: 'ts-jest',
testEnvironment: 'node'
testEnvironment: 'node',
testRegex: 'test/.*\\.test\\.ts$'
}
1 change: 1 addition & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"extends": "./tsconfig.json",
"include": [
"src",
"test",
"jest.*.js"
]
Expand Down

0 comments on commit 6e9207a

Please sign in to comment.