Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/214511
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/11/214511/1
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: newchange
Gerrit-Change-Id: I84b254ea76385c042191e04a0d0a46d64e358ae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits