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 occasional type errors when running tests #935

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Oct 12, 2022

I have noticed that locally yarn test will succeed the first time, the will fail with a type error saying toNeverResolve is undefined. After running yarn jest --clearCache, tests will pass again once then fail again.

This custom Jest matcher was added in #930. Seemingly the way the type was added is causing this problem.

I'm not entirely sure what's going on here. Something about the way Jest is loading this file is making Jest confused about this type. I found that it works more reliably if the type is moved to a separate file in the types directory.

I have noticed that locally `yarn test` will succeed the first time,
the will fail with a type error saying `toNeverResolve` is undefined.
After running `yarn jest --clearCache`, tests will pass again once then
fail again.

This custom Jest matcher was added in #930. Seemingly the way the type
was added is causing this problem.

I'm not entirely sure what's going on here. Something about the way
Jest is loading this file is making Jest confused about this type.
I found that it works more reliably if the type is moved to a separate
file in the `types` directory.
@Gudahtt Gudahtt marked this pull request as ready for review October 12, 2022 19:04
@Gudahtt Gudahtt requested a review from a team as a code owner October 12, 2022 19:04
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

I'm not getting the error when running tests locally myself, but this doesn't seem to have any ill effects, so LGTM.

@Gudahtt Gudahtt merged commit 4c70024 into main Oct 12, 2022
@Gudahtt Gudahtt deleted the fix-occasional-test-type-errors branch October 12, 2022 20:13
gantunesr pushed a commit that referenced this pull request Dec 8, 2022
I have noticed that locally `yarn test` will succeed the first time,
the will fail with a type error saying `toNeverResolve` is undefined.
After running `yarn jest --clearCache`, tests will pass again once then
fail again.

This custom Jest matcher was added in #930. Seemingly the way the type
was added is causing this problem.

I'm not entirely sure what's going on here. Something about the way
Jest is loading this file is making Jest confused about this type.
I found that it works more reliably if the type is moved to a separate
file in the `types` directory.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
I have noticed that locally `yarn test` will succeed the first time,
the will fail with a type error saying `toNeverResolve` is undefined.
After running `yarn jest --clearCache`, tests will pass again once then
fail again.

This custom Jest matcher was added in #930. Seemingly the way the type
was added is causing this problem.

I'm not entirely sure what's going on here. Something about the way
Jest is loading this file is making Jest confused about this type.
I found that it works more reliably if the type is moved to a separate
file in the `types` directory.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
I have noticed that locally `yarn test` will succeed the first time,
the will fail with a type error saying `toNeverResolve` is undefined.
After running `yarn jest --clearCache`, tests will pass again once then
fail again.

This custom Jest matcher was added in #930. Seemingly the way the type
was added is causing this problem.

I'm not entirely sure what's going on here. Something about the way
Jest is loading this file is making Jest confused about this type.
I found that it works more reliably if the type is moved to a separate
file in the `types` directory.
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.

2 participants