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

feat: --watch, -w, watch is prior to config's watch #736

Closed
wants to merge 1 commit into from

Conversation

Aslemammad
Copy link
Member

Resolves #727

@netlify
Copy link

netlify bot commented Feb 11, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 4bed09b

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/6206d4e41f2e3000074f57b4

😎 Browse the preview: https://deploy-preview-736--vitest-dev.netlify.app

Copy link
Member

@DerYeger DerYeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does fix watch flags not working at all if a config value is used, so that's good.

However, even with the --watch flag, tests are still shown as RUN and not WATCH in the CLI. So the best approach would have been #717, i.e., setting correct default values.

@Aslemammad
Copy link
Member Author

@DerYeger What is your suggestion on this PR then?

@DerYeger
Copy link
Member

@DerYeger What is your suggestion on this PR then?

I'd merge it, since it fixes the broken behavior.

@Aslemammad
Copy link
Member Author

@DerYeger Thanks, let's see if the team agrees.

options.api = resolveApiConfig(options)
options.watch = options.watch && !options.run
if (isWatchArg())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the plugin coupled with CLI argv is probably not a good idea. I will take another try

@antfu antfu closed this in 5dca4ed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config watch: false requires --no-run to be overridden
3 participants