Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Oct 11, 2021
1 parent bbe6917 commit d2ab51e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* 2.0.
*/

import type { PackageListItem } from '../../common/types/models';
import type { CustomIntegration } from '../../../../../src/plugins/custom_integrations/common';
import type { PackageListItem } from '../../../../common/types/models';
import type { CustomIntegration } from '../../../../../../../src/plugins/custom_integrations/common';

import type { IntegrationCategory } from '../../../../../src/plugins/custom_integrations/common';
import type { IntegrationCategory } from '../../../../../../../src/plugins/custom_integrations/common';

import { useMergeEprPackagesWithReplacements } from './use_merge_epr_with_replacements';

Expand Down Expand Up @@ -46,7 +46,7 @@ describe('useMergeEprWithReplacements', () => {
},
]);

expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, '')).toEqual([
expect(useMergeEprPackagesWithReplacements(eprPackages, replacements)).toEqual([
{
name: 'aws',
release: 'ga',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const args: Args = {
url: '/',
icons: [],
integration: '',
categories: ['foobar'],
};

const argTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
{
title: 'Package Two',
Expand All @@ -58,6 +59,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
{
title: 'Package Three',
Expand All @@ -69,6 +71,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
{
title: 'Package Four',
Expand All @@ -80,6 +83,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
{
title: 'Package Five',
Expand All @@ -91,6 +95,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
{
title: 'Package Six',
Expand All @@ -102,6 +107,7 @@ export const List = (props: Args) => (
url: 'https://example.com',
icons: [],
integration: 'integation',
categories: ['web'],
},
]}
onSearchChange={action('onSearchChange')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function mergeCategoriesAndCount(
// Count all the categories
cards.forEach((integration) => {
integration.categories.forEach((cat) => {
addIfMissing(cat, 1, INTEGRATION_CATEGORY_DISPLAY[cat]);
addIfMissing(cat, 1, INTEGRATION_CATEGORY_DISPLAY[cat] as string);
});
});

Expand Down

0 comments on commit d2ab51e

Please sign in to comment.