Skip to content

Commit

Permalink
test: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kaustavb12 committed Jun 14, 2024
1 parent 8aa7082 commit 89d5d5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/data/selectors/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ describe('root selectors', () => {
describe('if neither/only 1 are default values', () => {
beforeEach(() => {
filterConstants.filterConfig[filterName] = testConfig;
config = selectors.root.filterBadgeConfig(testState, filterName);
});
describe.each([
['neither', () => false],
['only filter1', (v) => v === filters[0]],
['only filter2', (v) => v === filters[1]],
], '%1 is default', (label, isDefaultFn) => {
['only filter1', (n, v) => v === filters[0]],
['only filter2', (n, v) => v === filters[1]],
])('%1 is default', (label, isDefaultFn) => {
it('returns isDefault: false, string value, and remaining filterConfig', () => {
selectors.filters.isDefault.mockImplementation(isDefaultFn);
config = selectors.root.filterBadgeConfig(testState, filterName);
const { filterOrder, ...rest } = testConfig;
expect(config).toEqual({
isDefault: false,
Expand Down

0 comments on commit 89d5d5c

Please sign in to comment.