Skip to content

Commit

Permalink
Fixed issue with package.json config
Browse files Browse the repository at this point in the history
  • Loading branch information
Hargne committed Feb 11, 2025
1 parent fdd512f commit df2b8c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/
test-report/
dist/
report.html
test-report.html
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-html-reporter",
"version": "4.0.0",
"version": "4.0.1",
"description": "Jest test results processor for generating a summary in HTML",
"main": "dist/index.js",
"unpkg": "dist/index.js",
Expand Down
4 changes: 3 additions & 1 deletion src/extractConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export default function (cliConfig: unknown): JestHTMLReporterConfiguration {
path.join(process.cwd(), "jesthtmlreporter.config.json")
);
const packageJsonConfig =
readJsonFile(path.join(process.cwd(), "package.json"))?.jest || {};
readJsonFile(path.join(process.cwd(), "package.json"))[
"jest-html-reporter"
] || {};

// Merge configurations in priority order (with sanitization)
return {
Expand Down

0 comments on commit df2b8c1

Please sign in to comment.