Closed EarthyOrange closed 2 years ago
That’s an interesting feature idea. Do any other test runners/frameworks provide it?
I could see something similar with “no todo”, and both being specifiable via an env var, so you can have different values in CI.
@ljharb I haven't used any other test runners/frameworks to be honest. I have however seen cases where developers accidentally commit a test with only method added to it. So the hooks and CI just run that one test and declare success.
Seems reasonable.
hi @ljharb, tape user here. I've been going through the code recently and it has been quite a good learning experience. I would like a few clarifications to help raise a PR for this
I could see something similar with “no todo”, and both being specifiable via an env var, so you can have different values in CI.
@ljharb, does this comment mean we'll be going with the env var approach exclusively instead of a command-line argument as stated in the issue description?
No, both is ideal/needed. However, for each, if an env var is specified a command line flag should overwrite it.
No, both is ideal/needed. However, for each, if an env var is specified a command line flag should overwrite it.
okay got it, thanks
Fixed by #572.
tape cli command when invoked with --no-only flag should throw an error if there is a test built with
only
method.Usage example:
tape test/**/*.js --no-only