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

feat(@jest/expect): Expose type of actual to Matchers #13848

Merged
merged 8 commits into from Feb 2, 2023

Commits on Jan 31, 2023

  1. feat(@jest/expect): Expose type of actual to Matchers

    Matchers isn't as typed as some users would like (see jestjs#13334, jestjs#13812).
    For users who want to customize it by extending the `Matchers`
    interface, it's useful to have access to the type of `actual` (the
    argument of `expect`) so you can do, say,
    ```ts
    interface Matchers<R, T> {
        toTypedEqual(expected: T): R
    }
    ```
    This commit exposes it. The first-party matchers still have the same
    types as before.
    benjaminjkraft committed Jan 31, 2023
    Copy the full SHA
    4bfbc6b View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. review comments

    benjaminjkraft committed Feb 1, 2023
    Copy the full SHA
    b9c5c27 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d6459b4 View commit details
    Browse the repository at this point in the history
  3. changelog comments

    Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
    benjaminjkraft and mrazauskas committed Feb 1, 2023
    Copy the full SHA
    2b7490e View commit details
    Browse the repository at this point in the history
  4. Update CHANGELOG.md

    Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
    benjaminjkraft and mrazauskas committed Feb 1, 2023
    Copy the full SHA
    2b4fa2d View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    fc53bed View commit details
    Browse the repository at this point in the history
  6. review comments

    Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
    benjaminjkraft and mrazauskas committed Feb 1, 2023
    Copy the full SHA
    6230a94 View commit details
    Browse the repository at this point in the history
  7. review comments, again

    Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
    benjaminjkraft and mrazauskas committed Feb 1, 2023
    Copy the full SHA
    12d3bcc View commit details
    Browse the repository at this point in the history