Skip to content

Failed to get mock metadata: node_modules/@sentry/react/cjs/index.js #5994

Closed
@EvgenyOrekhov

Description

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

7.16.0

Framework Version

React 18.2.0

Link to Sentry event

No response

Steps to Reproduce

  1. Write a Jest test with the following contents:
import { init } from '@sentry/react';
jest.mock('@sentry/react');

Expected Result

No error

Actual Result

Test fails with Failed to get mock metadata: node_modules/@sentry/react/cjs/index.js

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions