Skip to content

Commit

Permalink
Prettify files
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielliwerant committed Oct 16, 2019
1 parent b21e6a5 commit f7d0de7
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions test/MUIDataTable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,21 @@ describe('<MUIDataTable />', function() {
it('should properly set searchText when hiding the search bar', () => {
const options = {
rowsPerPage: 1,
textLabels
textLabels,
};
const shallowWrapper = shallow(<MUIDataTable columns={columns} data={data} />);
const table = shallowWrapper.dive();
const instance = table.instance();
const shallowWrapperTableToolbar = shallow(<TableToolbar options={options} searchTextUpdate={spy()} searchClose={instance.searchClose} columns={columns} data={data} setTableAction={spy()} />);
const shallowWrapperTableToolbar = shallow(
<TableToolbar
options={options}
searchTextUpdate={spy()}
searchClose={instance.searchClose}
columns={columns}
data={data}
setTableAction={spy()}
/>,
);
const instanceTableToolbar = shallowWrapperTableToolbar.dive().instance();

instance.searchTextUpdate('Joe');
Expand All @@ -800,12 +809,21 @@ describe('<MUIDataTable />', function() {
it('should not change page when hiding the search bar', () => {
const options = {
rowsPerPage: 1,
textLabels
textLabels,
};
const shallowWrapper = shallow(<MUIDataTable columns={columns} data={data} options={options} />);
const table = shallowWrapper.dive();
const instance = table.instance();
const shallowWrapperTableToolbar = shallow(<TableToolbar options={options} searchTextUpdate={spy()} searchClose={instance.searchClose} columns={columns} data={data} setTableAction={spy()} />);
const shallowWrapperTableToolbar = shallow(
<TableToolbar
options={options}
searchTextUpdate={spy()}
searchClose={instance.searchClose}
columns={columns}
data={data}
setTableAction={spy()}
/>,
);
const instanceTableToolbar = shallowWrapperTableToolbar.dive().instance();

// Simulate a search that has multiple pages of results
Expand Down

0 comments on commit f7d0de7

Please sign in to comment.