Skip to content

Commit

Permalink
move stracktracelimit change further down in runTest
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 9, 2019
1 parent 5075185 commit e5d4d10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/jest-runner/src/runTest.ts
Expand Up @@ -82,9 +82,6 @@ async function runTestInternal(
resolver: Resolver,
context?: TestRunnerContext,
): Promise<RunTestInternalResult> {
// Node's error-message stack size is limited at 10, but it's pretty useful
// to see more than that when a test fails.
Error.stackTraceLimit = 100;
const testSource = fs.readFileSync(path, 'utf8');
const docblockPragmas = docblock.parse(docblock.extract(testSource));
const customEnvironment = docblockPragmas['jest-environment'];
Expand Down Expand Up @@ -221,6 +218,9 @@ async function runTestInternal(
};
}

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

Expand Down

0 comments on commit e5d4d10

Please sign in to comment.