Reputation: 1315
I'm trying to use ignoreTestFiles
in cypress so that incomplete tests will not get run in the test suite.
The path to my tests is:
C:\Users\userA\IdeaProjects\automated_tests\cypress\integration\ignoredTestFiles
In cypress.json
, I have the following entry:
"ignoreTestFiles": "*ignoredTestFiles*"
I used Globster to verify the minimatch, and it says its correct. But when I run my tests, these files are not getting ignored.
Upvotes: 16
Views: 11467
Reputation: 61
ignoreTestFiles
has now been depracated, and replaced by excludeSpecPattern
:
{
//ignore built-in test files
excludeSpecPattern: [
"**/1-getting-started/.*.js",
"**/2-advanced-examples/.*.js",
]
}
Upvotes: 6
Reputation: 17408
You can also pass array
like:
{
"ignoreTestFiles": [
"**/1-getting-started/*.js",
"**/2-advanced-examples/*.js"
]
}
Upvotes: 15
Reputation: 10575
You need to specify a match for files, so I suggest you to add *.js
to your expression.
Also, you need to add another *
to match any sub-directory structure, try this expression instead:
"ignoreTestFiles": "**/ignoredTestFiles/*.js"
Upvotes: 29