Skip to content

Commit

Permalink
test: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Jul 5, 2021
1 parent 6d96ff1 commit 53b3745
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,14 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/hierarchica
];

test.each`
ordered | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['name:asc']} | ${resultsViaSortBy}
${false} | ${['name:asc']} | ${resultsViaSortBy}
facetOrderingInResult | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['name:asc']} | ${resultsViaSortBy}
${false} | ${['name:asc']} | ${resultsViaSortBy}
`(
'renderingContent present: $ordered, sortBy: $sortBy',
({ ordered, sortBy, expected }) => {
'renderingContent present: $facetOrderingInResult, sortBy: $sortBy',
({ facetOrderingInResult, sortBy, expected }) => {
const renderFn = jest.fn();
const unmountFn = jest.fn();
const createHierarchicalMenu = connectHierarchicalMenu(
Expand Down Expand Up @@ -800,7 +800,7 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/hierarchica

hierarchicalMenu.init!(createInitOptions({ helper }));

const renderingContent = ordered
const renderingContent = facetOrderingInResult
? {
facetOrdering: {
values: {
Expand Down
16 changes: 8 additions & 8 deletions src/connectors/menu/__tests__/connectMenu-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,14 +704,14 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/menu/js/#co
];

test.each`
ordered | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['name:asc']} | ${resultsViaSortBy}
${false} | ${['name:asc']} | ${resultsViaSortBy}
facetOrderingInResult | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['name:asc']} | ${resultsViaSortBy}
${false} | ${['name:asc']} | ${resultsViaSortBy}
`(
'renderingContent present: $ordered, sortBy: $sortBy',
({ ordered, sortBy, expected }) => {
'renderingContent present: $facetOrderingInResult, sortBy: $sortBy',
({ facetOrderingInResult, sortBy, expected }) => {
const renderFn = jest.fn();
const unmountFn = jest.fn();
const createMenu = connectMenu(renderFn, unmountFn);
Expand All @@ -727,7 +727,7 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/menu/js/#co
})
);

const renderingContent = ordered
const renderingContent = facetOrderingInResult
? {
facetOrdering: {
values: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2639,14 +2639,14 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/refinement-
];

test.each`
ordered | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['isRefined']} | ${resultsViaSortBy}
${false} | ${['isRefined']} | ${resultsViaSortBy}
facetOrderingInResult | sortBy | expected
${true} | ${undefined} | ${resultsViaFacetOrdering}
${false} | ${undefined} | ${resultsViaSortBy}
${true} | ${['isRefined']} | ${resultsViaSortBy}
${false} | ${['isRefined']} | ${resultsViaSortBy}
`(
'renderingContent present: $ordered, sortBy: $sortBy',
({ ordered, sortBy, expected }) => {
'renderingContent present: $facetOrderingInResult, sortBy: $sortBy',
({ facetOrderingInResult, sortBy, expected }) => {
const renderFn = jest.fn();
const unmountFn = jest.fn();
const createRefinementList = connectRefinementList(
Expand All @@ -2667,7 +2667,7 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/refinement-
})
);

const renderingContent = ordered
const renderingContent = facetOrderingInResult
? {
facetOrdering: {
values: {
Expand Down

0 comments on commit 53b3745

Please sign in to comment.