File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/components/src/higher-order/with-context/test Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,17 @@ import renderer from 'react-test-renderer';
55import PropTypes from 'prop-types' ;
66
77/**
8- * Internal dependencies
8+ * WordPress dependencies
99 */
10- import withContext from '../' ;
10+ import { Component } from '@wordpress/element' ;
11+ import deprecated from '@wordpress/deprecated' ;
1112
1213/**
13- * WordPress dependencies
14+ * Internal dependencies
1415 */
15- import { Component } from '@wordpress/element' ;
16+ import withContext from '../' ;
17+
18+ jest . mock ( '@wordpress/deprecated' , ( ) => jest . fn ( ) ) ;
1619
1720class PassContext extends Component {
1821 getChildContext ( ) {
@@ -39,7 +42,7 @@ describe( 'withContext', () => {
3942 ) ;
4043
4144 expect ( wrapper . root . findByType ( 'div' ) . children [ 0 ] ) . toBe ( 'ok' ) ;
42- expect ( console ) . toHaveWarned ( ) ;
45+ expect ( deprecated ) . toHaveBeenCalled ( ) ;
4346 } ) ;
4447
4548 it ( 'should allow specifying a context getter mapping' , ( ) => {
You can’t perform that action at this time.
0 commit comments