Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add displayName to TestResult #4408

Merged
merged 1 commit into from
Sep 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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