Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for a regular expression as testMatch config option #3

Open
SanjoSolutions opened this issue Sep 17, 2021 · 0 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@SanjoSolutions
Copy link

playwright.config.cjs:

module.exports = {
  testMatch: /.*\.e2e\.(test|spec)\.(js|ts|mjs)/
}

running:

npx playwright-watch test -c playwright.config.cjs

shows the error:

TypeError: Non-string provided as watch path: /.*\.e2e\.(test|spec)\.(js|ts|mjs)/,!node_modules
    at unifyPaths (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\chokidar\index.js:96:11)
    at FSWatcher.add (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\chokidar\index.js:411:15)
    at Object.watch (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\chokidar\index.js:969:11)
    at watch (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\lib\watch.js:18:12)
    at Object.defaultCommand [as handler] (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\commands\defaultCommand.js:7:3)
    at C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\node_modules\yargs\build\index.cjs:1:9052
    at j (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\node_modules\yargs\build\index.cjs:1:4931)
    at M.applyMiddlewareAndGetResult (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\node_modules\yargs\build\index.cjs:1:9021)
    at M.runCommand (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\node_modules\yargs\build\index.cjs:1:7206)
    at Bt.[runYargsParserAndExecuteCommands] (C:\Users\jonas\Desktop\tic-tac-toe\node_modules\playwright-watch\node_modules\yargs\build\index.cjs:1:54693)

This works when running Playwright directly with npx playwright test --browser=chromium -c playwright.config.cjs.

@iamyoki iamyoki added bug Something isn't working help wanted Extra attention is needed labels Sep 18, 2021
@iamyoki iamyoki self-assigned this Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants