Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Apr 12, 2019
1 parent 97abdcb commit d5df439
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jest.mock('../../core/createConnector', () => x => x);

describe('connectConfigure', () => {
describe('single index', () => {
const contextValue = { ais: { mainTargetedIndex: 'index' } };
const contextValue = { mainTargetedIndex: 'index' };

it('propagates the props to the SearchParameters without children & contextValue', () => {
const searchParameters = connect.getSearchParameters.call(
Expand Down Expand Up @@ -45,9 +45,9 @@ describe('connectConfigure', () => {
});

it('calling transitionState should add configure parameters to the search state', () => {
const ctx = {};
const instance = {};
let searchState = connect.transitionState.call(
ctx,
instance,
{
distinct: 1,
whatever: 'please',
Expand All @@ -62,7 +62,7 @@ describe('connectConfigure', () => {
});

searchState = connect.transitionState.call(
ctx,
instance,
{ whatever: 'other', children: 'whatever', contextValue },
{ configure: { distinct: 1, whatever: 'please' } },
{ configure: { distinct: 1, whatever: 'please' } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ describe('connectPagination', () => {
});

it("calling refine updates the widget's search state", () => {
const nextState = connect.refine({}, { otherKey: 'val' }, 'yep');
const nextState = connect.refine(
{ contextValue },
{ otherKey: 'val' },
'yep'
);
expect(nextState).toEqual({
otherKey: 'val',
page: 'yep',
Expand Down

0 comments on commit d5df439

Please sign in to comment.