I have a playwright-jest
setup with multiple spec files (test suites). I need to skip one of them, but it needs to stay in the same directory of its repo (moving it is not an option).
The default script under package.json
is "test": "jest -c jest.config.js"
and I know we may run it with npm run test TestSuiteName.spec.ts
for individual suites, and without a file name - npm run test
, it runs the entire Test Plan - but - how can I exclude just 1 (or a few) and run the rest of it all?
I have tried to find config flags for it but without luck. What's worked so far is describe.skip()
for that particular file, and that's mostly what I could come up so far as a decent workaround. However, I don't want to be making changes to the code before every run.
I was hoping to see if anyone has a better way to do it? Regex maybe? Or perhaps through jest.config
with an option flag?