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

[BUG] @nx-dotnet/core:test watch option is not working as expected #425

Closed
mxa0079 opened this issue Apr 24, 2022 · 6 comments · Fixed by #426
Closed

[BUG] @nx-dotnet/core:test watch option is not working as expected #425

mxa0079 opened this issue Apr 24, 2022 · 6 comments · Fixed by #426
Labels
bug Something isn't working outdated scope: core

Comments

@mxa0079
Copy link

mxa0079 commented Apr 24, 2022

Describe the bug
According to the documentation there is a watch option that would determines if dotnet test or dotnet watch test is used to execute tests.

However, this option results on the wrong command being invoked and it does not work as expected

To Reproduce
Steps to reproduce the behavior:

  1. Generate a new dotnet project with a corresponding xUnit test project
  2. Run the test executor for this unit test project, confirms it runs as expected
  3. Open project.json for the test project and add the watch option:
"test": {
     "executor": "@nx-dotnet/core:test",
     "options": {
       "watch": true //The watch option
     }
   },
  1. Try to test the project in watch mode and watch the wrong command being invoked:

Executing Command: dotnet "--project" "/testporjectpath/Project.Test.csproj" "test"
Unknown option: --project

Expected behavior
To run the test project in watch mode

Screenshots
NA

Environment:

  • OS: MacOs Monterrey
  • Browser NA
  • Version .net 5
@mxa0079 mxa0079 added bug Something isn't working needs-triage This issue has yet to be looked over by a core team member labels Apr 24, 2022
@AgentEnder AgentEnder added scope: core and removed needs-triage This issue has yet to be looked over by a core team member labels Apr 25, 2022
@AgentEnder
Copy link
Member

Hey @mxa0079! Thanks for the report, it looks like this wasn't covered by our tests and was subsequently missed when changing over to use spawn.

github-actions bot pushed a commit that referenced this issue Apr 25, 2022
## [1.9.12](v1.9.11...v1.9.12) (2022-04-25)

### Bug Fixes

* **dotnet:** dotnet watch --project ... test should work ([#426](#426)) ([1575dda](1575dda)), closes [#425](#425)

Apr 25, 2022, 6:28 PM
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.9.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mxa0079
Copy link
Author

mxa0079 commented Apr 25, 2022

Thanks @AgentEnder for the prompt reply.

Ive updated to version 1.9.12 - the project now runs with the watch = true option however it does not run on watch mode. Hence, I request to re-open the issues.

@AgentEnder
Copy link
Member

@mxa0079 I can't replicate the behavior you are describing.... running nx test {project}-test --watch launches the tests and retests when a file changes. Can you give more details to the errors you are seeing? Maybe some screenshots of terminal outputs could help.

@mxa0079
Copy link
Author

mxa0079 commented Apr 26, 2022

My bad, things are working now. Thanks for your help! Fantastic response time, kudos to the whole team. Have a wonderful week!

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated scope: core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants