From 99980dc6b224fc41aac202e9d799d84393513008 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 7 Apr 2017 13:25:14 +0200 Subject: [PATCH] strip-test-selectors: Replace isNotTestSelector() with isTestSelector() --- strip-test-selectors.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/strip-test-selectors.js b/strip-test-selectors.js index aeacc961..28e94ec4 100644 --- a/strip-test-selectors.js +++ b/strip-test-selectors.js @@ -4,8 +4,8 @@ let TEST_SELECTOR_PREFIX = /data-test-.*/; -function isNotTestSelector(attribute) { - return !TEST_SELECTOR_PREFIX.test(attribute); +function isTestSelector(attribute) { + return TEST_SELECTOR_PREFIX.test(attribute); } function StripTestSelectorsTransform() { @@ -18,15 +18,15 @@ StripTestSelectorsTransform.prototype.transform = function(ast) { walker.visit(ast, function(node) { if (node.type === 'ElementNode') { node.attributes = node.attributes.filter(function(attribute) { - return isNotTestSelector(attribute.name); + return !isTestSelector(attribute.name); }); } else if (node.type === 'MustacheStatement' || node.type === 'BlockStatement') { node.params = node.params.filter(function(param) { - return isNotTestSelector(param.original); + return !isTestSelector(param.original); }); node.hash.pairs = node.hash.pairs.filter(function(pair) { - return isNotTestSelector(pair.key); + return !isTestSelector(pair.key); }); } });