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

Feature Request: --no-only flag for tape CLI command #569

Closed
EarthyOrange opened this issue Nov 6, 2021 · 9 comments
Closed

Feature Request: --no-only flag for tape CLI command #569

EarthyOrange opened this issue Nov 6, 2021 · 9 comments

Comments

@EarthyOrange
Copy link

EarthyOrange commented Nov 6, 2021

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

@ljharb
Copy link
Collaborator

ljharb commented Nov 6, 2021

That’s an interesting feature idea. Do any other test runners/frameworks provide it?

@ljharb
Copy link
Collaborator

ljharb commented Nov 6, 2021

I could see something similar with “no todo”, and both being specifiable via an env var, so you can have different values in CI.

@EarthyOrange
Copy link
Author

@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.

@ljharb
Copy link
Collaborator

ljharb commented Nov 7, 2021

Seems reasonable.

@jocrah
Copy link
Contributor

jocrah commented Jan 18, 2022

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

@jocrah
Copy link
Contributor

jocrah commented Jan 18, 2022

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?

@ljharb
Copy link
Collaborator

ljharb commented Jan 18, 2022

No, both is ideal/needed. However, for each, if an env var is specified a command line flag should overwrite it.

@jocrah
Copy link
Contributor

jocrah commented Jan 18, 2022

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

@ljharb
Copy link
Collaborator

ljharb commented Jan 26, 2022

Fixed by #572.

@ljharb ljharb closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants