Skip to content

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

@mxa0079

Description

@mxa0079

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions