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

chore(expect): remove some dependencies on jest internals #8782

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

JoelEinbinder
Copy link
Contributor

As Simen suggests in jestjs/jest#11816, we can remove the
dependency on jest-matcher-utils by using this.utils in our matchers. I cleaned
up some other places were we use internal types that are not needed.

We still are requiring two unexported files: expect/build/matchers and expect/build/print



@@ -45,7 +37,7 @@ export async function toMatchText(
throw new Error(`${matcherName} must be called during the test`);
expectType(receiver, receiverType, matcherName);

const matcherOptions: MatcherHintOptions = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we copy this type definition for our own safety?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It gets checked down below when we pass it in as an argument.

@mrienstra
Copy link
Contributor

@dgozman, @JoelEinbinder, is this ready to merge? Anything I can do to help if not?

@JoelEinbinder JoelEinbinder merged commit 351c20b into microsoft:master Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants