On client everything works as expected. If include import in jest environment it fails:
import { createReduxEnhancer } from "@sentry/nextjs";
Everything is working fine with version 7.
Expected Result
I would like the import to still work.
Actual Result
● Test suite failed to run
Cannot find module '@sentry/nextjs' from 'libs/redux/src/lib/store.ts'
Require stack:
libs/redux/src/lib/store.ts
libs/authentication/src/lib/FormLogin.spec.tsx
3 | type StoreEnhancer,
4 | } from "@reduxjs/toolkit";
> 5 | import { createReduxEnhancer } from "@sentry/nextjs";
| ^
at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
at Object.<anonymous> (libs/redux/src/lib/store.ts:5:1)
at Object.<anonymous> (libs/authentication/src/lib/FormLogin.spec.tsx:5:1)
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.15.0
Framework Version
Jest 29.7.0, Next 14.1.4
Link to Sentry event
No response
SDK Setup/Reproduction Example
No response
Steps to Reproduce
On client everything works as expected. If include import in jest environment it fails:
Everything is working fine with version 7.
Expected Result
I would like the import to still work.
Actual Result