Skip to content

Commit

Permalink
Filter out AppRegistry logs from output (facebook#47658)
Browse files Browse the repository at this point in the history
Summary:

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.

Differential Revision: D66094274
  • Loading branch information
rubennorte authored and facebook-github-bot committed Nov 18, 2024
1 parent 794154e commit 7e1a6a9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions jest/integration/runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7e1a6a9

Please sign in to comment.