Skip to content

Commit ae2410c

Browse files
committed
PWA-3363::Layered-nav-changes
1 parent a52f259 commit ae2410c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/peregrine/lib/talons/RootComponents/Category/__tests__/useCategoryContent.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ describe('useCategoryContent tests', () => {
124124
mockProductFiltersByCategoryData
125125
])
126126
.mockReturnValueOnce([mockGetSortMethods, mockSortData]);
127-
const rendered = createTestInstance(<Component {...mockProps} />);
128-
129-
const talonProps = rendered.root.findByType('i').props;
130-
131-
expect(mockGetFilters).toHaveBeenCalled();
132-
expect(mockGetSortMethods).toHaveBeenCalled();
133-
expect(useQuery).toHaveBeenCalled();
134-
expect(useLazyQuery).toHaveBeenCalled();
135-
expect(talonProps).toMatchSnapshot();
127+
const testProps = Object.assign({}, mockProps, {
128+
categoryId: 0
129+
});
130+
const rendered = createTestInstance(<Component {...testProps} />);
131+
const talonProps = rendered.root.findByType('i').props;
132+
133+
expect(useQuery).toHaveBeenCalled();
134+
expect(useLazyQuery).toHaveBeenCalled();
135+
expect(talonProps).toMatchSnapshot();
136136
});
137137

138138
it('handles default category id', () => {

0 commit comments

Comments
 (0)