From eadd8081b6f8e1e36b12a30330d6183d4b365142 Mon Sep 17 00:00:00 2001 From: Kevin Partington Date: Thu, 24 Nov 2016 11:51:49 -0600 Subject: [PATCH] Chore: Fix prefer-arrow-callback lint errors (#7651) --- tests/lib/ast-utils.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/lib/ast-utils.js b/tests/lib/ast-utils.js index 9f2a496e662..a1078b5c68f 100644 --- a/tests/lib/ast-utils.js +++ b/tests/lib/ast-utils.js @@ -667,7 +667,7 @@ describe("ast-utils", () => { }); }); - describe("getFunctionNameWithKind", function() { + describe("getFunctionNameWithKind", () => { const expectedResults = { "function foo() {}": "function 'foo'", "(function foo() {})": "function 'foo'", @@ -714,7 +714,7 @@ describe("ast-utils", () => { }; Object.keys(expectedResults).forEach(key => { - it(`should return "${expectedResults[key]}" for "${key}".`, function() { + it(`should return "${expectedResults[key]}" for "${key}".`, () => { let called = false; /** @@ -740,7 +740,7 @@ describe("ast-utils", () => { }); }); - describe("getFunctionHeadLoc", function() { + describe("getFunctionHeadLoc", () => { const expectedResults = { "function foo() {}": [0, 12], "(function foo() {})": [1, 13], @@ -798,7 +798,7 @@ describe("ast-utils", () => { } }; - it(`should return "${JSON.stringify(expectedLoc)}" for "${key}".`, function() { + it(`should return "${JSON.stringify(expectedLoc)}" for "${key}".`, () => { let called = false; /** @@ -824,7 +824,7 @@ describe("ast-utils", () => { }); }); - describe("isEmptyBlock", function() { + describe("isEmptyBlock", () => { const expectedResults = { "{}": true, "{ a }": false, @@ -832,7 +832,7 @@ describe("ast-utils", () => { }; Object.keys(expectedResults).forEach(key => { - it(`should return ${expectedResults[key]} for ${key}`, function() { + it(`should return ${expectedResults[key]} for ${key}`, () => { const ast = espree.parse(key); assert.strictEqual(astUtils.isEmptyBlock(ast.body[0]), expectedResults[key]); @@ -840,7 +840,7 @@ describe("ast-utils", () => { }); }); - describe("isEmptyFunction", function() { + describe("isEmptyFunction", () => { const expectedResults = { "(function foo() {})": true, "(function foo() { a })": false, @@ -850,7 +850,7 @@ describe("ast-utils", () => { }; Object.keys(expectedResults).forEach(key => { - it(`should return ${expectedResults[key]} for ${key}`, function() { + it(`should return ${expectedResults[key]} for ${key}`, () => { const ast = espree.parse(key, {ecmaVersion: 6}); assert.strictEqual(astUtils.isEmptyFunction(ast.body[0].expression), expectedResults[key]);