Skip to content

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

Open
@guisehn

Description

@guisehn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions