Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Whorton committed Feb 26, 2024
1 parent 04e224b commit ddb4fbc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/__tests__/FilterPanel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / frontend

Missing JSDoc @returns description
*/
function setupEnzyme() {
const props = {
onFilterToggle: jest.fn(),
hasButton: true,
hasFilterToggle: true,
hasFilters: false,
hasFilters: true,
};

const target = shallow(<FilterPanel {...props} />);
Expand Down Expand Up @@ -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');

Expand All @@ -108,7 +107,6 @@ describe('mapStateToProps', () => {
const actual = mapStateToProps(state);
expect(actual).toEqual({
hasButton: false,
hasFilterToggle: false,
hasFilters: true,
});
});
Expand Down

0 comments on commit ddb4fbc

Please sign in to comment.