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

Node API Buffer is available on @edge-runtime/jest-environment #952

Open
guisehn opened this issue Aug 24, 2024 · 0 comments · May be fixed by #953
Open

Node API Buffer is available on @edge-runtime/jest-environment #952

guisehn opened this issue Aug 24, 2024 · 0 comments · May be fixed by #953

Comments

@guisehn
Copy link

guisehn commented Aug 24, 2024

Bug Report

The @edge-runtime/jest-environment package allows simulating the Edge runtime when running Jest in a node environment, so it should not allow access to node apis such as Buffer.

Current behavior

Right now, it's possible to access Buffer in a test case.

Expected behavior/code

Buffer will not be available in production when using the edge runtime, so it should also be unavailable in tests.

That way, we can catch in tests when unavailable APIs are used.

Possible solution

#953

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.

1 participant