Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Oct 25, 2024
1 parent f5b1ebf commit 867bc25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion projects/js-packages/wp-data-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@babel/core": "^7.0.0",
"@babel/preset-env": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@types/jest": "29.5.12",
"@wordpress/data": "10.9.0",
"jest": "29.7.0",
"react": "18.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { createWpDataSync } from '../src/create-wp-data-sync';
jest.mock( '@wordpress/api-fetch' );

const registerStore = () => {
const { reducers, ...config } = createWpDataSync( 'testSettings', {
const { reducer, ...config } = createWpDataSync( 'testSettings', {
endpoint: '/test',
getSliceFromState: state => state.testSettings,
} );

const store = createReduxStore( 'some-store-id', {
Expand All @@ -15,7 +16,7 @@ const registerStore = () => {
if ( action.type === 'RESET' ) {
return {};
}
return reducers.testSettings( state, action );
return reducer( state, action );
},
} ),
...config,
Expand Down

0 comments on commit 867bc25

Please sign in to comment.