You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:The aim of this config is to allow hooks into the runResults, for instance to generate jUnit test reports.
The json that jest --json outputs only shows part of the runResults object
Closesjestjs#850
Differential Revision: D3121902
fb-gh-sync-id: fecd0aa344f9bf59369e28be7b4e58f2eeeb9d73
fbshipit-source-id: fecd0aa344f9bf59369e28be7b4e58f2eeeb9d73
@@ -508,6 +509,48 @@ A regexp pattern string that is matched against all test paths before executing
508
509
509
510
This is useful if you need to override the default. If you are testing one file at a time the default will be set to `/.*/`, however if you pass a blob rather than a single file the default will then be the absolute path of each test file. The override may be needed on windows machines where, for example, the test full path would be `C:/myproject/__tests__/mystest.jsx.jest` and the default pattern would be set as `/C:\myproject\__tests__\mystest.jsx.jest/`.
510
511
512
+
### `config.testResultsProcessor`[string]
513
+
(default: `undefined`)
514
+
515
+
This option allows the use of a custom results processor. This processor must be a node module that exports a function expecting an object with the following structure as the first argument:
516
+
517
+
```
518
+
{
519
+
"success": bool,
520
+
"startTime": epoch,
521
+
"numTotalTestSuites": number,
522
+
"numPassedTestSuites": number,
523
+
"numFailedTestSuites": number,
524
+
"numRuntimeErrorTestSuites": number,
525
+
"numTotalTests": number,
526
+
"numPassedTests": number,
527
+
"numFailedTests": number,
528
+
"numPendingTests": number,
529
+
"testResults": [{
530
+
"numFailingTests": number,
531
+
"numPassingTests": number,
532
+
"numPendingTests": number,
533
+
"testResults": [{
534
+
"title": string (message in it block),
535
+
"status": "failed" | "pending" | "passed",
536
+
"ancestorTitles": [string (message in describe blocks)],
0 commit comments