mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
Filter out AppRegistry logs from output (#47658)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47658 Changelog: [internal] AppRegistry logs are showing up again in Fantom because we changed the order and now they're not necessarily showing up last. This fixes that by filtering them out in any position. Reviewed By: sammy-SC Differential Revision: D66094274 fbshipit-source-id: bd37394252ee6309f7093567f9a2b73b641938ce
This commit is contained in:
parent
4dd60acb7d
commit
7be98c99bd
@ -30,15 +30,10 @@ function parseRNTesterCommandResult(
|
||||
): {logs: string, testResult: TestSuiteResult} {
|
||||
const stdout = result.stdout.toString();
|
||||
|
||||
const outputArray = stdout.trim().split('\n');
|
||||
|
||||
// Remove AppRegistry logs at the end
|
||||
while (
|
||||
outputArray.length > 0 &&
|
||||
outputArray[outputArray.length - 1].startsWith('Running "')
|
||||
) {
|
||||
outputArray.pop();
|
||||
}
|
||||
const outputArray = stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.filter(log => !log.startsWith('Running "')); // remove AppRegistry logs.
|
||||
|
||||
// The last line should be the test output in JSON format
|
||||
const testResultJSON = outputArray.pop();
|
||||
|
Loading…
Reference in New Issue
Block a user