Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: qunit/tests/filterValidation.js

Issue 29581937: Noissue - Use anonymous blocks instead of anonymous functions (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 18, 2017, 2:10 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « qunit/tests/cssEscaping.js ('k') | qunit/tests/prefs.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 (function()
4 { 3 {
5 const {parseFilter, parseFilters} = require("filterValidation"); 4 const {parseFilter, parseFilters} = require("filterValidation");
6 const {BlockingFilter, 5 const {BlockingFilter,
7 ElemHideFilter, 6 ElemHideFilter,
8 CommentFilter} = require("filterClasses"); 7 CommentFilter} = require("filterClasses");
9 8
10 module("Filter validation"); 9 module("Filter validation");
11 10
12 test("Detecting invalid filters", () => 11 test("Detecting invalid filters", () =>
13 { 12 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 63
65 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking"); 64 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking");
66 equal(result.filters[0].text, "||example.com^", "1st filter text matches"); 65 equal(result.filters[0].text, "||example.com^", "1st filter text matches");
67 66
68 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide"); 67 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide");
69 equal(result.filters[1].text, "###foobar", "2nd filter text matches"); 68 equal(result.filters[1].text, "###foobar", "2nd filter text matches");
70 69
71 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment"); 70 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment");
72 equal(result.filters[2].text, "! foo bar", "3rd filter text matches"); 71 equal(result.filters[2].text, "! foo bar", "3rd filter text matches");
73 }); 72 });
74 }()); 73 }
OLDNEW
« no previous file with comments | « qunit/tests/cssEscaping.js ('k') | qunit/tests/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld