Skip to content

Commit e5d4d10

Browse files
committed
move stracktracelimit change further down in runTest
1 parent 5075185 commit e5d4d10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/jest-runner/src/runTest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ async function runTestInternal(
8282
resolver: Resolver,
8383
context?: TestRunnerContext,
8484
): Promise<RunTestInternalResult> {
85-
// Node's error-message stack size is limited at 10, but it's pretty useful
86-
// to see more than that when a test fails.
87-
Error.stackTraceLimit = 100;
8885
const testSource = fs.readFileSync(path, 'utf8');
8986
const docblockPragmas = docblock.parse(docblock.extract(testSource));
9087
const customEnvironment = docblockPragmas['jest-environment'];
@@ -221,6 +218,9 @@ async function runTestInternal(
221218
};
222219
}
223220

221+
// Node's error-message stack size is limited at 10, but it's pretty useful
222+
// to see more than that when a test fails.
223+
Error.stackTraceLimit = 100;
224224
try {
225225
await environment.setup();
226226

0 commit comments

Comments
 (0)