Skip to content

feat: introduce new @jest/expect-utils package#12323

Merged
SimenB merged 1 commit intojestjs:mainfrom
SimenB:expect-utils
Feb 9, 2022
Merged

feat: introduce new @jest/expect-utils package#12323
SimenB merged 1 commit intojestjs:mainfrom
SimenB:expect-utils

Conversation

@SimenB
Copy link
Copy Markdown
Member

@SimenB SimenB commented Feb 7, 2022

Summary

Fixes #11867.

We also need to figure out how to expose build/matchers, but that also ties into adding custom TS matchers. Not 100% sure how to deal with that?

Also, far from all utils need to be exposed in this way, we should cull the API surface.

EDIT: Hmm, would it be better to just add all this to jest-matcher-utils?

Test plan

Green CI

@SimenB SimenB added this to the Jest 28 milestone Feb 7, 2022
@timkindberg
Copy link
Copy Markdown

Wow lots of changes for a seemingly simple ask, thank you!

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #12323 (928f634) into main (201901f) will decrease coverage by 0.25%.
The diff coverage is 85.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12323      +/-   ##
==========================================
- Coverage   67.25%   67.00%   -0.26%     
==========================================
  Files         330      330              
  Lines       17354    17352       -2     
  Branches     5073     5072       -1     
==========================================
- Hits        11671    11626      -45     
- Misses       5651     5694      +43     
  Partials       32       32              
Impacted Files Coverage Δ
packages/expect-utils/src/utils.ts 87.80% <ø> (ø)
packages/expect/src/index.ts 91.33% <ø> (ø)
packages/expect/src/matchers.ts 97.86% <ø> (ø)
packages/expect/src/spyMatchers.ts 88.91% <ø> (ø)
packages/expect/src/toThrowMatchers.ts 93.67% <ø> (ø)
packages/jest-snapshot/src/printSnapshot.ts 100.00% <ø> (ø)
packages/expect/src/asymmetricMatchers.ts 84.66% <84.21%> (-0.17%) ⬇️
packages/expect-utils/src/jasmineUtils.ts 73.83% <100.00%> (ø)

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 201901f...928f634. Read the comment docs.

@SimenB SimenB force-pushed the expect-utils branch 4 times, most recently from 0e09149 to 322395d Compare February 9, 2022 10:51
@SimenB SimenB merged commit 86bf6fc into jestjs:main Feb 9, 2022
@SimenB SimenB deleted the expect-utils branch February 9, 2022 12:50
@github-actions
Copy link
Copy Markdown

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 Mar 12, 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.

[Feature]: Expose equals from expect package.

4 participants