Skip to content

Add a "missing suspense boundary" warning/error #1046

Closed
@joshribakoff-sm

Description

@joshribakoff-sm
function Suspender() {
  throw new Promise(() => null);
  return null;
}

render(<Suspender />)
screen.debug()

This logs:

  console.log
    <body>
      <div />
    </body>
    

It's missing the error:

A React component suspended while rendering, but no fallback UI was specified

In a "real" (non test) environment, you get this warning. Ideally test semantics match the real semantics.

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