Skip to content

Commit

Permalink
Use PropertiesModalProps instead of any
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Jan 21, 2022
1 parent e410592 commit c1d0ec9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Slice } from 'src/types/Chart';
import { render, screen, waitFor } from 'spec/helpers/testing-library';
import fetchMock from 'fetch-mock';
import userEvent from '@testing-library/user-event';
import PropertiesModal from '.';
import PropertiesModal, { PropertiesModalProps } from '.';

const createProps = () => ({
slice: {
Expand Down Expand Up @@ -68,6 +68,7 @@ const createProps = () => ({
show: true,
onHide: jest.fn(),
onSave: jest.fn(),
addSuccessToast: jest.fn(),
});

fetchMock.get('glob:*/api/v1/chart/318', {
Expand Down Expand Up @@ -160,7 +161,7 @@ afterAll(() => {
fetchMock.resetBehavior();
});

const renderModal = (props: any) =>
const renderModal = (props: PropertiesModalProps) =>
render(<PropertiesModal {...props} />, { useRedux: true });

test('Should render null when show:false', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Chart, { Slice } from 'src/types/Chart';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import withToasts from 'src/components/MessageToasts/withToasts';

type PropertiesModalProps = {
export type PropertiesModalProps = {
slice: Slice;
show: boolean;
onHide: () => void;
Expand Down

0 comments on commit c1d0ec9

Please sign in to comment.