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]: Tests marked as .todo inside describe.only blocks are shown as "skipped" #13482

Closed
ramos-ph opened this issue Oct 21, 2022 · 3 comments · Fixed by #13504
Closed

[Bug]: Tests marked as .todo inside describe.only blocks are shown as "skipped" #13482

ramos-ph opened this issue Oct 21, 2022 · 3 comments · Fixed by #13504

Comments

@ramos-ph
Copy link

ramos-ph commented Oct 21, 2022

Version

29.2.1

Steps to reproduce

I've provided this small repo with 2 test files: https://github.com/ramos-ph/jest-todo-issue

To reproduce:

  1. Clone the repo
  2. Run npm install
  3. Run npx jest --verbose, so you can see the output.

Expected behavior

I expect to see all of the tests labeled as todo, instead of having tests labeled as "skipped"

Actual behavior

The tests labeled as .todo inside a describe.only block are not labeled correctly as such, instead, labeled as "skipped"

Additional context

The output of npx jest --verbose:

 PASS  ./correct.test.js
  without .only, should show 'passed', 'todo', 'todo'
    ✓ passing test
    ✎ todo todo test 1
    ✎ todo todo test 2

 PASS  ./bug.test.js
  with .only, should show 'passed', 'todo', 'todo'
    ✓ passing test (1 ms)
    ○ skipped todo test 1
    ○ skipped todo test 2

Test Suites: 2 passed, 2 total
Tests:       2 skipped, 2 todo, 2 passed, 6 total
Snapshots:   0 total
Time:        0.393 s, estimated 1 s
Ran all test suites.

Environment

System:
    OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i3-10100F CPU @ 3.60GHz
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.19 - /mnt/c/Users/Pedro Ramos/AppData/Roaming/npm/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  npmPackages:
    jest: ^29.2.1 => 29.2.1
@SimenB
Copy link
Member

SimenB commented Oct 21, 2022

PR welcome! 🙂

@SimenB
Copy link
Member

SimenB commented Oct 24, 2022

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants