jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/371056 )

Change subject: Organize linter tests by category
......................................................................


Organize linter tests by category

Change-Id: I61f0377238eb2e51de22a706ef81ab7351647a44
---
M tests/mocha/linter.js
1 file changed, 31 insertions(+), 1 deletion(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve
  Arlolra: Looks good to me, approved



diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index 969e63e..49f1750 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -29,6 +29,9 @@
                                return result.should.be.empty;
                        });
                });
+       });
+
+       describe('MISSING END TAGS', function() {
                it('should lint missing end tags correctly', function() {
                        return parseWT('<div>foo').then(function(result) {
                                result.should.have.length(1);
@@ -49,6 +52,9 @@
                                result[0].params.should.have.a.property("name", 
"p");
                        });
                });
+       });
+
+       describe('STRIPPED TAGS', function() {
                it('should lint stripped tags correctly', function() {
                        return parseWT('foo</div>').then(function(result) {
                                result.should.have.length(1);
@@ -116,6 +122,9 @@
                                result[0].params.should.have.a.property("name", 
"small");
                        });
                });
+       });
+
+       describe('OBSOLETE TAGS', function() {
                it('should lint obsolete tags correctly', function() {
                        return parseWT('<tt>foo</tt>bar').then(function(result) 
{
                                result.should.have.length(1);
@@ -152,6 +161,9 @@
                                result[1].params.should.have.a.property("name", 
"tt");
                        });
                });
+       });
+
+       describe('FOSTERED CONTENT', function() {
                it('should lint fostered content correctly', function() {
                        return parseWT('{|\nfoo\n|-\n| 
bar\n|}').then(function(result) {
                                result.should.have.length(1);
@@ -180,7 +192,10 @@
                                result[0].should.have.a.property("type", 
"fostered");
                        });
                });
-               it('should lint ignored table attributes Correctly', function() 
{
+       });
+
+       describe('IGNORED TABLE ATTRIBUTES', function() {
+               it('should lint ignored table attributes correctly', function() 
{
                        return parseWT('{|\n|- 
foo\n|bar\n|}').then(function(result) {
                                result.should.have.length(1);
                                result[0].should.have.a.property("type", 
"ignored-table-attr");
@@ -208,6 +223,9 @@
                                result[0].dsr.should.deep.equal([ 3, 30, 22, 0 
]);
                        });
                });
+       });
+
+       describe('BOGUS IMAGE OPTIONS', function() {
                it('should lint Bogus image options correctly', function() {
                        return 
parseWT('[[file:a.jpg|foo|bar]]').then(function(result) {
                                result.should.have.length(1);
@@ -259,6 +277,9 @@
                                result.should.have.length(0);
                        });
                });
+       });
+
+       describe('SELF-CLOSING TAGS', function() {
                it('should lint self-closing tags corrrectly', function() {
                        return parseWT('foo<b />bar<span />baz<hr />boo<br /> 
<ref name="boo" />').then(function(result) {
                                result.should.have.length(2);
@@ -283,6 +304,9 @@
                                
result[0].templateInfo.should.have.a.property("name", "Template:1x");
                        });
                });
+       });
+
+       describe('MIXED-CONTENT TEMPLATES', function() {
                it('should lint mixed-content templates', function() {
                        return parseWT('{{1x|*}}hi').then(function(result) {
                                result.should.have.length(1);
@@ -297,6 +321,9 @@
                                result[0].dsr.should.deep.equal([ 0, 17, null, 
null ]);
                        });
                });
+       });
+
+       describe('DELETABLE TABLE TAG', function() {
                it('should identify deletable table tag for T161341 (1)', 
function() {
                        var wt = [
                                "{| style='border:1px solid red;'",
@@ -374,6 +401,9 @@
                                result[1].dsr.should.deep.equal([ 29, 31, 0, 0 
]);
                        });
                });
+       });
+
+       describe('PWRAP BUG WORKAROUND', function() {
                it('should identify rendering workarounds needed for 
doBlockLevels bug', function() {
                        var wt = [
                                "<div><span style='white-space:nowrap'>",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61f0377238eb2e51de22a706ef81ab7351647a44
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.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

Reply via email to