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

fix(docs) clarify expect.any #12266

Merged
merged 3 commits into from Jan 24, 2022
Merged

fix(docs) clarify expect.any #12266

merged 3 commits into from Jan 24, 2022

Conversation

benjamingr
Copy link
Contributor

expect.any claims that it will check an object is created with a given constructor. This doesn't match the example following it since numbers are not created using the number constructor (they may be obtained with the number constructor called as a function).

Summary

Clarify the documentation for expect.any to explain the behavior for primitives is different from the one for objects.

`expect.any` claims that it will check an object is created with a given constructor. This doesn't match the example following it since numbers are not created using the number constructor (they may be obtained with the number constructor called as a function).
@benjamingr
Copy link
Contributor Author

cc @SimenB "First-time contributors need a maintainer to approve running workflows" since we know each other as fake-timers maintainers

@codecov-commenter
Copy link

Codecov Report

Merging #12266 (76074ce) into main (5d483ce) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12266   +/-   ##
=======================================
  Coverage   67.51%   67.51%           
=======================================
  Files         328      328           
  Lines       17246    17246           
  Branches     5071     5071           
=======================================
  Hits        11643    11643           
  Misses       5570     5570           
  Partials       33       33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d483ce...76074ce. Read the comment docs.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Could you also update the versioned docs?

image

I also think the trailing newline on 374 will be tagged by prettier (just run yarn lint:prettier and it should autofix)

docs/ExpectAPI.md Outdated Show resolved Hide resolved
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
@benjamingr
Copy link
Contributor Author

thanks! Could you also update the versioned docs?

Sure, let me update and push

@benjamingr
Copy link
Contributor Author

Done

@Biki-das
Copy link
Contributor

Done

thanks @benjamingr

@SimenB SimenB merged commit 5f71f86 into jestjs:main Jan 24, 2022
@SimenB
Copy link
Member

SimenB commented Jan 24, 2022

thanks!

@github-actions
Copy link

This pull request 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 Feb 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 this pull request may close these issues.

None yet

5 participants