File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,18 @@ import { render, cleanup } from 'react-testing-library';
5
5
6
6
import {
7
7
ReduxProvider ,
8
- useReduxState ,
9
8
useReduxSelectors ,
10
9
} from '../src/index' ;
11
10
12
11
describe ( 'stale props spec' , ( ) => {
13
12
afterEach ( cleanup ) ;
14
13
15
14
it ( 'ignores transient errors in selector (e.g. due to stale props)' , ( ) => {
15
+ const globalSelectors = {
16
+ count : state => state . count ,
17
+ } ;
16
18
const Parent = ( ) => {
17
- const { count } = useReduxState ( ) ;
19
+ const { count } = useReduxSelectors ( globalSelectors ) ;
18
20
return < Child parentCount = { count } /> ;
19
21
} ;
20
22
@@ -46,8 +48,11 @@ describe('stale props spec', () => {
46
48
it ( 'ensures consistency of state and props in selector' , ( ) => {
47
49
let selectorSawInconsistencies = false ;
48
50
51
+ const globalSelectors = {
52
+ count : state => state . count ,
53
+ } ;
49
54
const Parent = ( ) => {
50
- const { count } = useReduxState ( ) ;
55
+ const { count } = useReduxSelectors ( globalSelectors ) ;
51
56
return < Child parentCount = { count } /> ;
52
57
} ;
53
58
You can’t perform that action at this time.
0 commit comments