You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the jest is run with collectCoverage option set to true and coverageProvider set to 'babel' the actual test run fails with this error:
What is being imported does not really matter - if I remove imports by moving contents of that file in it just fails at something different (same error though).
Expected behavior/code
Tests should run normally without this error.
Possible solution
What I find working is to switch from 'babel' to 'v8', but that may not be the best solution.
Additional context/screenshots
App is in next and Im testing parts of nextjs middleware (NextRequest/NextResponse from "next/server" package). I also made sure that no new Function/eval is being present in third party deps that are being imported during the test.
Node version: 16.18.1
NPM version: 8.19.2
Jest version: 28.1.3
will be glad for any pointers/thoughts/ideas on this matter 💗
Will be glad to include more info
The text was updated successfully, but these errors were encountered:
Bug Report
Current behavior
When the jest is run with collectCoverage option set to true and coverageProvider set to 'babel' the actual test run fails with this error:
What is being imported does not really matter - if I remove imports by moving contents of that file in it just fails at something different (same error though).
Expected behavior/code
Tests should run normally without this error.
Possible solution
What I find working is to switch from 'babel' to 'v8', but that may not be the best solution.
Additional context/screenshots
App is in next and Im testing parts of nextjs middleware (NextRequest/NextResponse from "next/server" package). I also made sure that no new Function/eval is being present in third party deps that are being imported during the test.
Node version: 16.18.1
NPM version: 8.19.2
Jest version: 28.1.3
will be glad for any pointers/thoughts/ideas on this matter 💗
Will be glad to include more info
The text was updated successfully, but these errors were encountered: