Skip to content

Commit

Permalink
Fix lint (#10222)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage authored Jul 19, 2017
1 parent 1b4776f commit 7b9f643
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/jest/test-framework-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -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 {
Expand All @@ -68,7 +69,7 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) {
global.__hadDevFailures = e.stack;
}
};
}
};

const expectDev = function expectDev(actual) {
const expectation = expect(actual);
Expand Down

0 comments on commit 7b9f643

Please sign in to comment.