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

Writing tests without a function #7644

Closed
aymericbouzy opened this issue Jan 17, 2019 · 4 comments
Closed

Writing tests without a function #7644

aymericbouzy opened this issue Jan 17, 2019 · 4 comments

Comments

@aymericbouzy
Copy link
Contributor

πŸ’₯ Regression Report

As stated in #5493 (comment), PR #5558 has introduced a regression. Previously,

it("is skipped")

was the same as

it.skip("is skipped", () => {})

but much less verbose. Now it fails with

 FAIL  regression.test.js
  ● Test suite failed to run

    Missing second argument. It must be a callback function.

Last working version

Works in version: 22.1.2

Does not work in version: 23.6.0

Link to repl or repo (highly encouraged)

https://repl.it/@aymericbouzy/JestRegressionReproduction

(I'm unsure how to switch between jest versions using repl.it)

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS 10.14.2
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
  Binaries:
    Node: 8.9.1 - ~/.nvm/versions/node/v8.9.1/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.0.0 - ~/.nvm/versions/node/v8.9.1/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0 
@unional
Copy link
Contributor

unional commented Jan 17, 2019

The same for test.skip() which makes even more sense to keep the function optional.

@SimenB
Copy link
Member

SimenB commented Jan 18, 2019

Duplicate of #6430

Jest 24 will have test.todo for your use case: https://jestjs.io/docs/en/next/api#testtodoname

@SimenB SimenB closed this as completed Jan 18, 2019
@unional
Copy link
Contributor

unional commented Jan 18, 2019

Nice! Have been waiting for that as I come from ava. 🌷

@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 May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants