Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/321720

Change subject: linter: Add test for self-closed-tag inside a template
......................................................................

linter: Add test for self-closed-tag inside a template

Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3
---
M tests/mocha/lintertest.js
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/20/321720/1

diff --git a/tests/mocha/lintertest.js b/tests/mocha/lintertest.js
index 271aa42..9ff1e83 100644
--- a/tests/mocha/lintertest.js
+++ b/tests/mocha/lintertest.js
@@ -198,5 +198,17 @@
                                result[1].params.should.have.a.property("name", 
"span");
                        });
                });
+               it('should lint self-closing tags in a template correctly', 
function() {
+                       return parseWT('{{1x|<b />}}').then(function(result) {
+                               result.should.have.length(1);
+                               result[0].should.have.a.property("type", 
"self-closed-tag");
+                               result[0].dsr.should.include.members([ 0, 12, 
null, null ]);
+                               result[0].should.have.a.property("src", 
"{{1x|<b />}}");
+                               result[0].should.have.a.property("params");
+                               result[0].params.should.have.a.property("name", 
"b");
+                               
result[0].should.have.a.property("templateInfo");
+                               
result[0].templateInfo.should.have.a.property("name", "1x");
+                       });
+               });
        });
 });

-- 
To view, visit https://gerrit.wikimedia.org/r/321720
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to