LEFT | RIGHT |
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 Loading... |
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 }()); |
LEFT | RIGHT |