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

Delta Between Two Patch Sets: qunit/tests/filterValidation.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Left Patch Set: Rebased. Created March 7, 2017, 10:44 a.m.
Right Patch Set: Use .includes again Created March 31, 2017, 8:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « qunit/tests/cssEscaping.js ('k') | qunit/tests/prefs.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 "use strict"; 1 "use strict";
2 2
3 (function()
3 { 4 {
4 const {parseFilter, parseFilters} = require("filterValidation"); 5 const {parseFilter, parseFilters} = require("filterValidation");
5 const {BlockingFilter, 6 const {BlockingFilter,
6 ElemHideFilter, 7 ElemHideFilter,
7 CommentFilter} = require("filterClasses"); 8 CommentFilter} = require("filterClasses");
8 9
9 module("Filter validation"); 10 module("Filter validation");
10 11
11 test("Detecting invalid filters", () => 12 test("Detecting invalid filters", () =>
12 { 13 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 64
64 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking"); 65 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking");
65 equal(result.filters[0].text, "||example.com^", "1st filter text matches"); 66 equal(result.filters[0].text, "||example.com^", "1st filter text matches");
66 67
67 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide"); 68 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide");
68 equal(result.filters[1].text, "###foobar", "2nd filter text matches"); 69 equal(result.filters[1].text, "###foobar", "2nd filter text matches");
69 70
70 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment"); 71 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment");
71 equal(result.filters[2].text, "! foo bar", "3rd filter text matches"); 72 equal(result.filters[2].text, "! foo bar", "3rd filter text matches");
72 }); 73 });
73 } 74 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld