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

Deno test runs tests in workspace twice if test is not in a member #25949

Open
nathanwhit opened this issue Sep 30, 2024 · 2 comments · May be fixed by #25990
Open

Deno test runs tests in workspace twice if test is not in a member #25949

nathanwhit opened this issue Sep 30, 2024 · 2 comments · May be fixed by #25990
Labels
bug Something isn't working correctly testing related to deno test and coverage workspaces

Comments

@nathanwhit
Copy link
Member

nathanwhit commented Sep 30, 2024

Title isn't quite accurate, it also only happens if you pass a path to deno test.

Repro:

// deno.jsonc
{
  "workspace": [
    "member"
  ]
}
❯ mkdir member; touch member/deno.json
// main_test.ts (in root of workspace)
Deno.test(function myCoolTest() {
  console.log("running test...");
})
❯ deno test .
running 1 test from ./main_test.ts
myCoolTest ...
------- output -------
running test...
----- output end -----
myCoolTest ... ok (0ms)
running 1 test from ./main_test.ts
myCoolTest ...
------- post-test output -------
running test...
----- post-test output end -----
myCoolTest ... ok (0ms)

ok | 2 passed | 0 failed (11ms)

If you omit the . or the test is in member, this doesn't occur

@nathanwhit nathanwhit changed the title Deno test runs tests in workspace twice ls Deno test runs tests in workspace twice if test is not in a member Sep 30, 2024
@nathanwhit nathanwhit added bug Something isn't working correctly testing related to deno test and coverage workspaces labels Sep 30, 2024
@yazan-abdalrahman
Copy link
Contributor

@nathanwhit
Hello, I found the issue and am writing a solution. I will push PR once I finish it.

@yazan-abdalrahman yazan-abdalrahman linked a pull request Oct 2, 2024 that will close this issue
@yazan-abdalrahman
Copy link
Contributor

@nathanwhit
done
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly testing related to deno test and coverage workspaces
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants