How to use a regex in Jest to search cross platform $(pwd)

Viewed 160
"generate": "cross-env ROOT_PATH=$(pwd) cross-env PACT=true jest --runInBand --testEnvironment=node --testPathPattern='.*[^/]pact\\.js$'"

I'm trying to figure out why my --testPathPattern is not matching files on Windows. Jest docs say to use / as path separator.

I think the problem is the ROOT_PATH because this won't work on Windows, I also tried ./ but that's not allowing me to match either.

0 Answers
Related