microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.58k stars 3.57k forks source link

[Bug]: `--only-changed` with no tests found should have exit code 0 #32180

Closed Skn0tt closed 2 weeks ago

Skn0tt commented 3 weeks ago

Version

latest

Steps to reproduce

Run with --only-changed if there are no tests.

Expected behavior

No tests found is printed, and it exits with exit code 0.

Actual behavior

No tests found is printed, and it exits with exit code 1.

Additional context

If folks want to use --only-changed in automation, then exit code 0 is a sane default.

Environment

irrelevant
gskierk commented 3 weeks ago

It works the same without --only-changed flag and it seems to be intended. To exit with success, use --pass-with-no-tests flag.