jenkins-bot has submitted this change and it was merged. Change subject: Only warn about non-selser wt2wt results if wt2wt was run ......................................................................
Only warn about non-selser wt2wt results if wt2wt was run * Try `node tests/parserTests --selser` Change-Id: I84b254ea76385c042191e04a0d0a46d64e358ae0 --- M tests/parserTests.js 1 file changed, 11 insertions(+), 9 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parserTests.js b/tests/parserTests.js index f39630f..c531617 100755 --- a/tests/parserTests.js +++ b/tests/parserTests.js @@ -1172,14 +1172,15 @@ console.log( 'UNEXPECTED FAIL'.red.inverse + ': ' + extTitle.yellow ); - if ( mode === 'selser' ) { - if ( blacklisted ) { - console.log( 'Blacklisted, but the output changed!'.red + ''); + if (mode === 'selser') { + if (blacklisted) { + console.log('Blacklisted, but the output changed!'.red); } - if ( item.wt2wtPassed ) { - console.log( 'Even worse, the non-selser wt2wt test passed!'.red + ''); - } else if ( actual && item.wt2wtResult !== actual.raw ) { - console.log( 'Even worse, the non-selser wt2wt test had a different result!'.red + ''); + if (item.hasOwnProperty('wt2wtPassed') && item.wt2wtPassed) { + console.log('Even worse, the non-selser wt2wt test passed!'.red); + } else if (actual && item.hasOwnProperty('wt2wtResult') && + item.wt2wtResult !== actual.raw) { + console.log('Even worse, the non-selser wt2wt test had a different result!'.red); } } @@ -1248,8 +1249,9 @@ console.log( outStr ); - if ( mode === 'selser' && !item.wt2wtPassed ) { - console.log( 'Even better, the non-selser wt2wt test failed!'.red + ''); + if (mode === 'selser' && item.hasOwnProperty('wt2wtPassed') && + !item.wt2wtPassed) { + console.log('Even better, the non-selser wt2wt test failed!'.red); } } return true; -- To view, visit https://gerrit.wikimedia.org/r/214511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84b254ea76385c042191e04a0d0a46d64e358ae0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> Gerrit-Reviewer: Cscott <canan...@wikimedia.org> Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits