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

Jest Failing After Upgrade #1588

Closed
Tracked by #1358
JoJ123 opened this issue Aug 12, 2022 · 4 comments
Closed
Tracked by #1358

Jest Failing After Upgrade #1588

JoJ123 opened this issue Aug 12, 2022 · 4 comments

Comments

@JoJ123
Copy link
Contributor

JoJ123 commented Aug 12, 2022

Describe the bug

Hi,
can you imagine why some of our Test Cases are failing with the following Error:
ReferenceError: AbortSignal is not defined
after we upgrade @graphql-yoga/node from 2.12.1-canary-23a9ff8.0 to the latest release.

If we revert the upgrade all test cases are passing again.

Your Example Website or App

test

Steps to Reproduce the Bug or Issue

Upgrade

Expected behavior

Upgrade without an issue.

Screenshots or Videos

No response

Platform

Node: 16.13.0
Jest: 26.6.3

Additional context

No response

@ardatan
Copy link
Collaborator

ardatan commented Aug 12, 2022

Could you share more details? Stacktrace maybe?

@JoJ123
Copy link
Contributor Author

JoJ123 commented Aug 12, 2022

Is this helping:
image

I figured out, that removing:
testEnvironment: 'node'
from the jest.config.ts helps to not throw the error, but it will destroy all the "nocks" we have recorded.

@kanziw
Copy link

kanziw commented Sep 7, 2022

With below dependencies,

graphql-yoga/common & graphql-yoga/node -> @whatwg-node/fetch@0.3.0 -> undici:5.8.0

undici access global AbortSignal

If you upgrade jest (>=v27.4.6), it might be solved. (jestjs/jest#12157)

I solve same problem by using yarn resolution (undici@4.13.0)

It's temporary solution. I'll upgrade jest version soon.

@theguild-bot theguild-bot mentioned this issue Nov 9, 2022
@ardatan
Copy link
Collaborator

ardatan commented Nov 9, 2022

We solved it in v3. You can try it out today. Let us know if you still have issues.
Check out our migration guide;
https://www.the-guild.dev/graphql/yoga-server/v3/migration/migration-from-yoga-v2

@ardatan ardatan closed this as completed Nov 9, 2022
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

No branches or pull requests

3 participants