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

test_runner: it.skip and it.todo are not working as expected in the reporter #47481

Closed
ErickWendel opened this issue Apr 8, 2023 · 7 comments · Fixed by #47867
Closed

test_runner: it.skip and it.todo are not working as expected in the reporter #47481

ErickWendel opened this issue Apr 8, 2023 · 7 comments · Fixed by #47867
Labels
test_runner Issues and PRs related to the test runner subsystem.

Comments

@ErickWendel
Copy link
Member

ErickWendel commented Apr 8, 2023

Version

v19.8.1

Platform

Darwin MacBook-Pro-4 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

import { describe, it } from 'node:test'
import { deepEqual } from 'node:assert'
describe('My test suite', () => {
  it.todo('should be a todo test')
  it.skip('should be a skip test')
  it('should assert a test', () => {
    deepEqual(0, 0)
  })
})
node --test index.test.mjs
▶ My test suite
  ✔ should be a todo test (0.188958ms)
  ✔ should be a skip test (0.034834ms)
  ✔ should assert a test (0.58775ms)
▶ My test suite (1.569917ms)

ℹ tests 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 49.43075

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

The test output should have
ℹ tests 3
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 1
ℹ todo 1

and the log should have different icons for each one:
📓 should be a todo test (0.188958ms)
➖ should be a skip test (0.034834ms)
✔ should assert a test (0.58775ms)
▶ My test suite (1.569917ms)

What do you see instead?

ℹ tests 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0

Additional information

@nodejs/test_runner

@ErickWendel ErickWendel changed the title test_runner: it.skip and it.todo not working test_runner: it.skip and it.todo not working as expected Apr 8, 2023
@ErickWendel ErickWendel changed the title test_runner: it.skip and it.todo not working as expected test_runner: it.skip and it.todo are not working as expected Apr 8, 2023
@ErickWendel ErickWendel changed the title test_runner: it.skip and it.todo are not working as expected test_runner: it.skip and it.todo are not working as expected in the reporter Apr 8, 2023
@ErickWendel
Copy link
Member Author

it seems to be solved while building from the source. Closing now

@cjihrig
Copy link
Contributor

cjihrig commented Apr 8, 2023

I don't think it's completely fixed. There seems to at least be at least one discrepancy when running with --test vs. without it:

Without --test:

﹣ should be a skip test (0.367292ms) # SKIP

With --test:

 ✔ should be a skip test (0.350333ms)

@benjamingr
Copy link
Member

Reopening per Colin's comment

@benjamingr benjamingr reopened this Apr 9, 2023
@VoltrexKeyva VoltrexKeyva added the test_runner Issues and PRs related to the test runner subsystem. label Apr 9, 2023
@ErickWendel
Copy link
Member Author

Perfect! Finally found something to work on 🤣

@ErickWendel
Copy link
Member Author

OMG, this week is crazy busy here! Gonna go back to it on the weekend!

@cjihrig
Copy link
Contributor

cjihrig commented May 10, 2023

@MoLow will this be fixed by #47867? If so, let's link the issues so they autoclose on merge.

@MoLow
Copy link
Member

MoLow commented May 11, 2023

indeed

nodejs-github-bot pushed a commit that referenced this issue May 15, 2023
PR-URL: #47867
Fixes: #44656
Fixes: #47955
Fixes: #47481
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this issue May 15, 2023
PR-URL: #47867
Fixes: #44656
Fixes: #47955
Fixes: #47481
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
danielleadams pushed a commit that referenced this issue Jul 6, 2023
PR-URL: #47867
Fixes: #44656
Fixes: #47955
Fixes: #47481
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MoLow added a commit to MoLow/node that referenced this issue Jul 6, 2023
PR-URL: nodejs#47867
Fixes: nodejs#44656
Fixes: nodejs#47955
Fixes: nodejs#47481
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants