Skip to content

Commit 1ef5b3b

Browse files
committed
Clean up non-standard temporary noop function in tests
1 parent 6d513d7 commit 1ef5b3b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/integration/autodiscovery.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ const expectedResults = {
1717
firstPostTitle: 'Markup: HTML Tags and Formatting',
1818
};
1919

20-
const noop = () => {};
21-
2220
describe( 'integration: discover()', () => {
2321
let apiPromise;
2422

2523
beforeAll( () => {
2624
apiPromise = WPAPI.discover( 'http://wpapi.local' );
2725
// Stub warn and error
28-
jest.spyOn( global.console, 'warn' ).mockImplementation( noop );
29-
jest.spyOn( global.console, 'error' ).mockImplementation( noop );
26+
jest.spyOn( global.console, 'warn' ).mockImplementation( () => {} );
27+
jest.spyOn( global.console, 'error' ).mockImplementation( () => {} );
3028
} );
3129

3230
it( 'returns a promise', () => {

0 commit comments

Comments
 (0)