I'm using Jest v26.6.3 and I'm trying to create a filter to programmatically select what tests to run.
I'm following the docs on how to setup a filter file, which seems simple enough, but jest returns Pattern: - 0 matches regardless of the pattern I specify.
PS: If I remove the filter from the CLI argument, jest is able to find/run the tests normally.
filter.js
module.exports = function(testPaths) {
return {
filtered: testPaths
};
};
CLI
jest --filter=absolute\path\to\filter.js
I know it is picking up the file because I console'd testPaths and it output the file paths as expected.
Any ideas? Thanks!