diff --git a/lib/rules/no-test-and-then.js b/lib/rules/no-test-and-then.js index 7168df13c0..80bef63681 100644 --- a/lib/rules/no-test-and-then.js +++ b/lib/rules/no-test-and-then.js @@ -21,12 +21,12 @@ module.exports = { }, create(context) { + if (!emberUtils.isTestFile(context.getFilename())) { + return {}; + } + return { CallExpression(node) { - if (!emberUtils.isTestFile(context.getFilename())) { - return; - } - const callee = node.callee; if (utils.isIdentifier(callee) && callee.name === 'andThen') { context.report({