Skip to content

Commit

Permalink
Add displayName to TestResult (#4408)
Browse files Browse the repository at this point in the history
  • Loading branch information
palmerj3 authored and cpojer committed Sep 1, 2017
1 parent a344d49 commit be6952d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const runAndTransformResultsToJestFormat = async ({

return {
console: null,
displayName: config.displayName,
failureMessage,
numFailingTests,
numPassingTests,
Expand Down
1 change: 1 addition & 0 deletions packages/jest-cli/src/test_result_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const buildFailureTestResult = (
): TestResult => {
return {
console: null,
displayName: '',
failureMessage: null,
numFailingTests: 0,
numPassingTests: 0,
Expand Down
1 change: 1 addition & 0 deletions packages/jest-runner/src/run_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function runTest(
result.sourceMaps = runtime.getSourceMapInfo();
result.console = testConsole.getBuffer();
result.skipped = testCount === result.numPendingTests;
result.displayName = config.displayName;
return result;
})
.then(
Expand Down
1 change: 1 addition & 0 deletions types/TestResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export type Suite = {|
export type TestResult = {|
console: ?ConsoleBuffer,
coverage?: RawCoverage,
displayName: ?string,
memoryUsage?: Bytes,
failureMessage: ?string,
numFailingTests: number,
Expand Down

0 comments on commit be6952d

Please sign in to comment.