From 0041247f72a7aae2616f45e97bb1ca7b0954d8ae Mon Sep 17 00:00:00 2001 From: Johan Brorson Date: Tue, 5 Apr 2022 14:57:02 +0200 Subject: [PATCH] docs: update configuration options in readme Add `testSuitePropertiesFile` and `testSuitePropertiesDirectory` configuration options to `README.md`. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90b3e58..c3a96ac 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ jest --ci --reporters=default --reporters=jest-junit ``` ## Usage as testResultsProcessor (deprecated) -The support for `testResultsProcessor` is only kept for [legacy reasons][test-results-processor] and might be removed in the future. +The support for `testResultsProcessor` is only kept for [legacy reasons][test-results-processor] and might be removed in the future. You should therefore prefer to configure `jest-junit` as a _reporter_. Should you still want to, add the following entry to your jest config: @@ -72,8 +72,10 @@ Reporter options should also be strings exception for suiteNameTemplate, classNa | `JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT` | `includeConsoleOutput` | Adds console output to any testSuite that generates stdout during a test run. | `false` | N/A | `JEST_JUNIT_INCLUDE_SHORT_CONSOLE_OUTPUT` | `includeShortConsoleOutput` | Adds short console output (only message value) to any testSuite that generates stdout during a test run. | `false` | N/A | `JEST_JUNIT_REPORT_TEST_SUITE_ERRORS` | `reportTestSuiteErrors` | Reports test suites that failed to execute altogether as `error`. _Note:_ since the suite name cannot be determined from files that fail to load, it will default to file path.| `false` | N/A -| `JEST_JUNIT_NO_STACK_TRACE` | `noStackTrace` | Omit stack traces from test failure reports, similar to `jest --noStackTrace` | `false` | N/A +| `JEST_JUNIT_NO_STACK_TRACE` | `noStackTrace` | Omit stack traces from test failure reports, similar to `jest --noStackTrace` | `false` | N/A | `JEST_USE_PATH_FOR_SUITE_NAME` | `usePathForSuiteName` | **DEPRECATED. Use `suiteNameTemplate` instead.** Use file path as the `name` attribute of `` | `"false"` | N/A +| `JEST_JUNIT_TEST_SUITE_PROPERTIES_JSON_FILE` | `testSuitePropertiesFile` | Name of the custom testsuite properties file | `"junitProperties.js"` | N/A +| `JEST_JUNIT_TEST_SUITE_PROPERTIES_DIR` | `testSuitePropertiesDirectory` | Location of the custom testsuite properties file | `process.cwd()` | N/A You can configure these options via the command line as seen below: