-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(cli): support configuring the test tool in the config file #15079
Conversation
This allows the user to use the config file to configure the included and excluded patterns of the test subcommand. It has many use cases, one of them is for example when the project uses dnt to transform the tests to work on Node.js, and place them in a directory called `out/`. The test tool should not look for test files in that directory, and instead of providing the CLI args to exclude that directory everytime, the user can just have a config file like the following: ```jsonc { "test": { "files": { "exclude": ["./out/"] } } } ``` This is just a single example, there might be more examples that will define the usefulness of the existence of this feature.
Related: #14263 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost good other than the LSP change. I also think this would be nice for the reason you mentioned.
@dsherret Mind another review? |
We've discussed this PR at the last CLI design meeting and we're in agreement this is useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @roj1512!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I just realized there's no tests for this. We'll need some integration tests before this lands (see lint/fmt tests for an example in cli/tests/integration).
@dsherret I added the include test. The last failed CI is not related to my changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @roj1512—this will be really nice to have.
This allows the user to use the config file to configure the included and excluded patterns of the test subcommand.
It has many use cases, one of them is for example when the project uses dnt to transform the tests to work on Node.js, and place them in a directory called
out/
. The test tool should not look for test files in that directory, and instead of providing the CLI args to exclude that directory everytime, the user can just have a config file like the following:This is just a single example, there might be more examples that will define the usefulness of the existence of this feature.
deno test
to deno.jsonc #14263