-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add util to create empty test result
- Loading branch information
Showing
5 changed files
with
46 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import {TestResult} from '@jest/test-result'; | ||
|
||
export default function emptyTestResult(): TestResult { | ||
return { | ||
leaks: false, // That's legacy code, just adding it so Flow is happy. | ||
numFailingTests: 0, | ||
numPassingTests: 0, | ||
numPendingTests: 0, | ||
numTodoTests: 0, | ||
openHandles: [], | ||
perfStats: { | ||
end: 0, | ||
start: 0, | ||
}, | ||
skipped: false, | ||
snapshot: { | ||
added: 0, | ||
fileDeleted: false, | ||
matched: 0, | ||
unchecked: 0, | ||
uncheckedKeys: [], | ||
unmatched: 0, | ||
updated: 0, | ||
}, | ||
testFilePath: '', | ||
testResults: [], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters