From df2b8c1036ff497b242e642ed7fae766a9e4d463 Mon Sep 17 00:00:00 2001 From: Johan Hargne Date: Tue, 11 Feb 2025 18:23:47 +0100 Subject: [PATCH] Fixed issue with package.json config --- .gitignore | 1 + package.json | 2 +- src/extractConfiguration.ts | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5ce0244..17b9e60 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ test-report/ dist/ report.html +test-report.html diff --git a/package.json b/package.json index 96d85dd..ea832f8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/extractConfiguration.ts b/src/extractConfiguration.ts index 3313ea1..d749fc3 100644 --- a/src/extractConfiguration.ts +++ b/src/extractConfiguration.ts @@ -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 {