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:
Pull Request resolved: facebook#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
  • Loading branch information
rubennorte authored and facebook-github-bot committed Nov 18, 2024
1 parent 4dd60ac commit 7be98c9
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 7be98c9

Please sign in to comment.