Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 93b9e2f

Browse files
Update jest to ignore files in node_modules
1 parent 33ed263 commit 93b9e2f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

‎jest.config.js‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ module.exports = {
2424
coverageDirectory: "coverage",
2525

2626
// An array of regexp pattern strings used to skip coverage collection
27-
// coveragePathIgnorePatterns: [
28-
// "\\\\node_modules\\\\"
29-
// ],
27+
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
3028

3129
// Indicates which provider should be used to instrument code for coverage
3230
// coverageProvider: "babel",
@@ -64,9 +62,7 @@ module.exports = {
6462
// maxWorkers: "50%",
6563

6664
// An array of directory names to be searched recursively up from the requiring module's location
67-
moduleDirectories: [
68-
"node_modules"
69-
],
65+
moduleDirectories: ["node_modules"],
7066

7167
// An array of file extensions your modules use
7268
// moduleFileExtensions: [
@@ -150,12 +146,10 @@ module.exports = {
150146
// ],
151147

152148
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
153-
// testPathIgnorePatterns: [
154-
// "\\\\node_modules\\\\"
155-
// ],
149+
testPathIgnorePatterns: ['<rootDir>/node_modules/'],
156150

157151
// The regexp pattern or array of patterns that Jest uses to detect test files
158-
// testRegex: [],
152+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$',
159153

160154
// This option allows the use of a custom results processor
161155
// testResultsProcessor: undefined,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /