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

Commit

Permalink
chore(Index): consistent integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Apr 9, 2019
1 parent 147201c commit c09bcd0
Showing 1 changed file with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,7 @@ describe('Index', () => {
},
};

const Dummy = props => {
return (
<pre>
{JSON.stringify(
props,
(key, val) => {
if (key === 'contextValue') {
expect(val).toEqual(context);
return 'context';
}
return val;
},
2
).replace(/"/g, '')}
</pre>
);
};
const Dummy = props => JSON.stringify(props, null, 2).replace(/"/g, '');

const Connected = createConnector({
displayName: 'Connector',
Expand All @@ -204,17 +188,20 @@ describe('Index', () => {
</InstantSearchProvider>
);

expect(wrapper.html()).toMatchInlineSnapshot(`
"<div><pre>{
expect(wrapper.text()).toMatchInlineSnapshot(`
"{
message: hello,
providedProps: {
contextValue: context,
contextValue: {
widgetsManager: {},
store: {}
},
indexContextValue: {
targetedIndex: test
},
message: hello
}
}</pre></div>"
}"
`);
});
});

0 comments on commit c09bcd0

Please sign in to comment.