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

Unified Diff: test/matcher.js

Issue 29375915: Issue 4878 - Start using ESLint for adblockpluscore (Closed)
Patch Set: Disable no-console for the tests Created Feb. 21, 2017, 11:25 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/matcher.js
diff --git a/test/matcher.js b/test/matcher.js
index 47a469bb445cfa9594f0e96a2f547e253b94156c..84ac32054312b8ab22128b4d7a5e445508a90ea5 100644
--- a/test/matcher.js
+++ b/test/matcher.js
@@ -17,7 +17,7 @@
"use strict";
-let {createSandbox} = require("./_common");
+const {createSandbox} = require("./_common");
let Filter = null;
let RegExpFilter = null;
@@ -42,13 +42,13 @@ function compareKeywords(test, text, expected)
{
let matcher = new Matcher();
let result = [];
- for (let dummy of expected)
+ for (let i = 0; i < expected.length; i++)
{
let keyword = matcher.findKeyword(filter);
result.push(keyword);
if (keyword)
{
- let dummyFilter = Filter.fromText('^' + keyword + '^');
+ let dummyFilter = Filter.fromText("^" + keyword + "^");
dummyFilter.filterCount = Infinity;
matcher.add(dummyFilter);
}
@@ -76,7 +76,7 @@ function checkMatch(test, filters, location, contentType, docDomain, thirdParty,
for (let filter of filters)
combinedMatcher.add(Filter.fromText(filter));
- let result = combinedMatcher.matchesAny(location, RegExpFilter.typeMap[contentType], docDomain, thirdParty, sitekey, specificOnly);
+ result = combinedMatcher.matchesAny(location, RegExpFilter.typeMap[contentType], docDomain, thirdParty, sitekey, specificOnly);
if (result)
result = result.text;
« .eslintrc.json ('K') | « test/filterStorage_readwrite.js ('k') | test/notification.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld