I tried many ways of importing jest into my project. All of them cause my app to crash displaying the blank screen when visiting localhost:3000 even though all statements cause app to compile (the single line of import causes the app to crash):
import { mocked } from "ts-jest"
import { mocked } from '@jest/globals'
import { jest } from 'ts-jest'
import { jest } from '@jest/globals'
App crashes with the following error:
VM551:2 Uncaught ReferenceError: process is not defined
I have the following dependency in package.json:
"ts-jest": "^28.0.7"
What might be the reason behind crashing? What is the correct way to import jest? I need specifically mocked object to be available, is there a right way to make it work without crashing the app?