-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bill Whorton
committed
Feb 26, 2024
1 parent
04e224b
commit ddb4fbc
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,13 @@ import renderer from 'react-test-renderer'; | |
import { shallow } from 'enzyme'; | ||
|
||
/** | ||
* @returns {void} | ||
* @returns {object} | ||
Check warning on line 14 in src/components/__tests__/FilterPanel.spec.js
|
||
*/ | ||
function setupEnzyme() { | ||
const props = { | ||
onFilterToggle: jest.fn(), | ||
hasButton: true, | ||
hasFilterToggle: true, | ||
hasFilters: false, | ||
hasFilters: true, | ||
}; | ||
|
||
const target = shallow(<FilterPanel {...props} />); | ||
|
@@ -88,7 +87,7 @@ describe('mapDispatchToProps', () => { | |
expect(dispatch.mock.calls.length).toEqual(1); | ||
}); | ||
|
||
it('allows the user to trigger Filter Panel', () => { | ||
it('allows the user to toggle Filter Panel', () => { | ||
const { target, props } = setupEnzyme(); | ||
const button = target.find('.filter-button button'); | ||
|
||
|
@@ -108,7 +107,6 @@ describe('mapStateToProps', () => { | |
const actual = mapStateToProps(state); | ||
expect(actual).toEqual({ | ||
hasButton: false, | ||
hasFilterToggle: false, | ||
hasFilters: true, | ||
}); | ||
}); | ||
|