Skip to content

Commit

Permalink
Chore: Add ESLint disable reasons for the jest-console tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Apr 9, 2020
1 parent f51cff2 commit b0da90e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/jest-console/src/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,21 @@ describe( 'jest-console', () => {
} );

describe( 'lifecycle', () => {
/* eslint-disable jest/no-standalone-expect */
beforeAll( () => {
// Disable reason:
// This is a difficult one to test, since the matcher's
// own lifecycle is defined to run before ours. Infer
// that we're being watched by testing the console
// method as being a spy.
// eslint-disable-next-line jest/no-standalone-expect
expect(
console[ methodName ].assertionsNumber
).toBeGreaterThanOrEqual( 0 );
} );
/* eslint-enable jest/no-standalone-expect */

/* eslint-disable-next-line jest/expect-expect */
// Disable reason:
// See beforeAll implementation and explanation added there.
// eslint-disable-next-line jest/expect-expect
it( 'captures logging in lifecycle', () => {} );
} );
} );
Expand Down

0 comments on commit b0da90e

Please sign in to comment.