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
exports[`throw error if test env does not have getVmContext 1`] =`
4
+
"
5
+
TypeError: Test environment found at \\"<rootDir>/EnvUsingRunScript.js\\" does not export a \\"getVmContext\\" method, which is mandatory from Jest 27. This method is a replacement for \\"runScript\\".
6
+
7
+
at ../../packages/jest-runner/build/index.js:157:45"
@@ -144,9 +148,20 @@ async function runTestInternal(
144
148
});
145
149
146
150
if(typeofenvironment.getVmContext!=='function'){
147
-
thrownewError(
151
+
constoriginalStack=newTypeError(
148
152
`Test environment found at "${testEnvironment}" does not export a "getVmContext" method, which is mandatory from Jest 27. This method is a replacement for "runScript".`,
153
+
)
154
+
.stack!.split('\n')
155
+
// Remove this file from the stack (jest-message-utils will keep one line)
0 commit comments