[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Reorganize some mocha tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/398650 ) Change subject: Linter: Reorganize some mocha tests .. Linter: Reorganize some mocha tests Change-Id: Ib4920d58a03697d7dbcfadbdf49bb19870f8 --- M tests/mocha/linter.js 1 file changed, 58 insertions(+), 60 deletions(-) Approvals: jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js index 801115b..7599a20 100644 --- a/tests/mocha/linter.js +++ b/tests/mocha/linter.js @@ -819,74 +819,72 @@ noLintsOfThisType('foo\nfoo x bar', "multiple-unclosed-formatting-tags"); }); }); - describe('MISC TIDY REPLACEMENT ISSUES', function() { - describe('Unclosed wikitext i/b in headings', function() { - it('should detect unclosed wikitext i tags in headings', function() { - return parseWT("==foo''a==\nx").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); - result[0].params.should.have.a.property("name", "i"); - result[0].params.should.have.a.property("ancestorName", "h2"); - }); - }); - it('should detect unclosed wikitext b tags in headings', function() { - return parseWT("==foo'''a==\nx").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); - result[0].params.should.have.a.property("name", "b"); - result[0].params.should.have.a.property("ancestorName", "h2"); - }); - }); - it('should not detect unclosed HTML i/b tags in headings', function() { - return parseWT("==fooa==\nx\n==fooa==\ny").then(function(result) { - result.should.have.length(2); - result[0].should.have.a.property("type", "missing-end-tag"); - result[1].should.have.a.property("type", "missing-end-tag"); - }); + describe('UNCLOSED WIKITEXT I/B tags in headings', function() { + it('should detect unclosed wikitext i tags in headings', function() { + return parseWT("==foo''a==\nx").then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); + result[0].params.should.have.a.property("name", "i"); + result[0].params.should.have.a.property("ancestorName", "h2"); }); }); - describe('Multiline HTML tables in lists', function() { - it('should detect multiline HTML tables in lists (1)', function() { - return parseWT("* x\n").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "multiline-html-table-in-list"); - result[0].params.should.have.a.property("name", "table"); - result[0].params.should.have.a.property("ancestorName", "li"); - }); + it('should detect unclosed wikitext b tags in headings', function() { + return parseWT("==foo'''a==\nx").then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); + result[0].params.should.have.a.property("name", "b"); + result[0].params.should.have.a.property("ancestorName", "h2"); }); - it('should detect multiline HTML tables in lists (2)', function() { - return parseWT("* x\n").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "multiline-html-table-in-list"); - result[0].params.should.have.a.property("name", "table"); -
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Reorganize some mocha tests
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398650 ) Change subject: Linter: Reorganize some mocha tests .. Linter: Reorganize some mocha tests Change-Id: Ib4920d58a03697d7dbcfadbdf49bb19870f8 --- M tests/mocha/linter.js 1 file changed, 58 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/50/398650/1 diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js index a4f914f..55e1019 100644 --- a/tests/mocha/linter.js +++ b/tests/mocha/linter.js @@ -869,74 +869,72 @@ noLintsOfThisType('foo\nfoo x bar', "multiple-unclosed-formatting-tags"); }); }); - describe('MISC TIDY REPLACEMENT ISSUES', function() { - describe('Unclosed wikitext i/b in headings', function() { - it('should detect unclosed wikitext i tags in headings', function() { - return parseWT("==foo''a==\nx").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); - result[0].params.should.have.a.property("name", "i"); - result[0].params.should.have.a.property("ancestorName", "h2"); - }); - }); - it('should detect unclosed wikitext b tags in headings', function() { - return parseWT("==foo'''a==\nx").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); - result[0].params.should.have.a.property("name", "b"); - result[0].params.should.have.a.property("ancestorName", "h2"); - }); - }); - it('should not detect unclosed HTML i/b tags in headings', function() { - return parseWT("==fooa==\nx\n==fooa==\ny").then(function(result) { - result.should.have.length(2); - result[0].should.have.a.property("type", "missing-end-tag"); - result[1].should.have.a.property("type", "missing-end-tag"); - }); + describe('UNCLOSED WIKITEXT I/B tags in headings', function() { + it('should detect unclosed wikitext i tags in headings', function() { + return parseWT("==foo''a==\nx").then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); + result[0].params.should.have.a.property("name", "i"); + result[0].params.should.have.a.property("ancestorName", "h2"); }); }); - describe('Multiline HTML tables in lists', function() { - it('should detect multiline HTML tables in lists (1)', function() { - return parseWT("* x\n").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "multiline-html-table-in-list"); - result[0].params.should.have.a.property("name", "table"); - result[0].params.should.have.a.property("ancestorName", "li"); - }); + it('should detect unclosed wikitext b tags in headings', function() { + return parseWT("==foo'''a==\nx").then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "unclosed-quotes-in-heading"); + result[0].params.should.have.a.property("name", "b"); + result[0].params.should.have.a.property("ancestorName", "h2"); }); - it('should detect multiline HTML tables in lists (2)', function() { - return parseWT("* x\n").then(function(result) { - result.should.have.length(1); - result[0].should.have.a.property("type", "multiline-html-table-in-list"); - result[0].params.should.have.a.property("name",