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

@edge-runtime/jest-environment does not define EdgeRuntime global #75

Closed
dferber90 opened this issue Aug 2, 2022 · 0 comments · Fixed by #77
Closed

@edge-runtime/jest-environment does not define EdgeRuntime global #75

dferber90 opened this issue Aug 2, 2022 · 0 comments · Fixed by #77
Assignees

Comments

@dferber90
Copy link

dferber90 commented Aug 2, 2022

It seems as if the @edge-runtime/jest-environment package does not define the EdgeRuntime global.

This prevents me from addressing the runtime in unit tests, which should normally work using

if (typeof EdgeRuntime !== 'string') {
  // dead-code elimination is enabled for the code inside this block
}

https://edge-runtime.vercel.sh/features/available-apis#addressing-the-runtime

Schniz added a commit that referenced this issue Aug 2, 2022
Kikobeats pushed a commit that referenced this issue Aug 2, 2022
Schniz added a commit that referenced this issue Aug 3, 2022
Schniz added a commit that referenced this issue Aug 3, 2022
@Schniz Schniz closed this as completed in #77 Aug 3, 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

Successfully merging a pull request may close this issue.

2 participants