Skip to content

Commit

Permalink
feat: Show rootDir in error message when a preset fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis committed Jul 17, 2024
1 parent 41f842a commit 305606f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ exports[`preset throws when module was found but no "jest-preset.js" or "jest-pr
exports[`preset throws when preset not found 1`] = `
"<red><bold><bold>● </intensity><bold>Validation Error</intensity>:</color>
<red></color>
<red> Preset <bold>doesnt-exist</intensity> not found.</color>
<red> Preset <bold>doesnt-exist</intensity> not found relative to rootDir <bold>/root/path/foo</intensity>.</color>
<red></color>
<red> <bold>Configuration Documentation:</intensity></color>
<red> https://jestjs.io/docs/configuration</color>
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const setupPreset = async (
);
}
throw createConfigError(
` Preset ${chalk.bold(presetPath)} not found.`,
` Preset ${chalk.bold(presetPath)} not found relative to rootDir ${chalk.bold(options.rootDir)}.`,
);
}
throw createConfigError(
Expand Down

0 comments on commit 305606f

Please sign in to comment.