You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently nx console allows me to run unit tests with the ability to change the watch boolean flag by way of the set flags menu prompt before the command is executed. I would like to also be able to set the watch boolean flag when using affected test and run-many tests.
I know this can be done becuase running the commands in the console does work.
For example: npx nx affected --target=test --watch=true
Motivation
We have many developers that like to click through the menus from nx console to run the commands rather than remember all the possible command combinations and type them out through the terminal. That seems to be the point of using nx console to begin with. This seems like a feature that it should have.
Suggested Implementation
I would like to be able to select and set the "watch" flag from the nx console menu "execute command or set flags" that comes up after I select the 'affected' or 'run-many' commands from the "common nx commands" menu.
Alternate Implementations
My suggestion goes with how it functions for the regular 'run' command found in the 'generate & run target' section. I would expect it to work the same. The only other way I can think of would be to have the run command be changed so that after selecting run I then select an option for run-many or run-affected followed by all the same options from the run flags menu.
The text was updated successfully, but these errors were encountered:
Hello :)
I think I misunderstood this issue a bit - let me ask for clarification.
You're referring to the watch flag that the executor (that runs the target) uses under the hood, right?
When we're running a single target, we know for sure what the executor is going to be so we can extract the necessary options and allow them as flags.
When we're running multiple targets via affected or run-many, we don't necessarily know which projects are going to be run with the target. And since test could mean very different things (some projects use jest, others vitest, others cypress or something custom with run-commands), we can't provide the options as nicely.
However, we can add the ability to support specifying arbitrary flags in there. So even if we can't make assumptions about the existence of a watch option, we'll allow you to specify it.
I've added the ability to add arbitrary flags in the above PR.
While this doesn't show you what you can run nicely in the quickpick as before, it gives you the option to specify it yourself.
Description
Currently nx console allows me to run unit tests with the ability to change the watch boolean flag by way of the set flags menu prompt before the command is executed. I would like to also be able to set the watch boolean flag when using affected test and run-many tests.
I know this can be done becuase running the commands in the console does work.
For example: npx nx affected --target=test --watch=true
Motivation
We have many developers that like to click through the menus from nx console to run the commands rather than remember all the possible command combinations and type them out through the terminal. That seems to be the point of using nx console to begin with. This seems like a feature that it should have.
Suggested Implementation
I would like to be able to select and set the "watch" flag from the nx console menu "execute command or set flags" that comes up after I select the 'affected' or 'run-many' commands from the "common nx commands" menu.
Alternate Implementations
My suggestion goes with how it functions for the regular 'run' command found in the 'generate & run target' section. I would expect it to work the same. The only other way I can think of would be to have the run command be changed so that after selecting run I then select an option for run-many or run-affected followed by all the same options from the run flags menu.
The text was updated successfully, but these errors were encountered: