From 7b9f64307d7d0d4e9df7f8e2316a2379d7c4bcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Wed, 19 Jul 2017 11:12:47 -0700 Subject: [PATCH] Fix lint (#10222) --- scripts/jest/test-framework-setup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/jest/test-framework-setup.js b/scripts/jest/test-framework-setup.js index a77e03caa6..fe258ce6ed 100644 --- a/scripts/jest/test-framework-setup.js +++ b/scripts/jest/test-framework-setup.js @@ -17,7 +17,8 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) { console.error = newError; // TODO: Stop using spyOn in all the test since that seem deprecated. - // Legacy upgrade path from https://github.com/facebook/jest/blob/21a2b7aaee366af7ed87ae78c5b2d58cf3f5fb86/packages/jest-matchers/src/spy_matchers.js#L160 + // This is a legacy upgrade path strategy from: + // https://github.com/facebook/jest/blob/v20.0.4/packages/jest-matchers/src/spyMatchers.js#L160 const isSpy = spy => spy.calls && typeof spy.calls.count === 'function'; env.beforeEach(() => { @@ -59,7 +60,7 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) { expect(console.error).toNotHaveBeenCalled(); }); - function wrapDevMatcher(obj, name) { + var wrapDevMatcher = function(obj, name) { const original = obj[name]; obj[name] = function devMatcher() { try { @@ -68,7 +69,7 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) { global.__hadDevFailures = e.stack; } }; - } + }; const expectDev = function expectDev(actual) { const expectation = expect(actual);