Skip to content

Commit

Permalink
remove any props not required in ProposalDataListItemStructure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabricevladimir committed Apr 23, 2024
1 parent 5554bff commit 1229c9a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ describe('<ProposalDataListItemStructure/> component', () => {
const { result, ...baseInputProps } = props ?? {};

const baseProps: Omit<IProposalDataListItemStructureProps, 'result'> = {
date: new Date().toISOString(),
tag: 'OSx Update',
publisher: { address: '0x123', link: '#' },
status: 'active',
summary: 'Example Summary',
title: 'Example Title',
voted: false,
type: 'approvalThreshold',
...baseInputProps,
};
Expand Down Expand Up @@ -109,6 +106,7 @@ describe('<ProposalDataListItemStructure/> component', () => {

it('renders with the given properties', () => {
const testProps = {
tag: 'OSx updates',
date: new Date().toISOString(),
publisher: { address: '0x123', link: '#' },
status: 'active',
Expand All @@ -125,6 +123,7 @@ describe('<ProposalDataListItemStructure/> component', () => {
expect(screen.getByText(testProps.status)).toBeInTheDocument();
expect(screen.getByText(testProps.date)).toBeInTheDocument();
expect(screen.getByText(testProps.id)).toBeInTheDocument();
expect(screen.getByText(testProps.tag)).toBeInTheDocument();
expect(screen.getByText(addressUtils.truncateAddress(testProps.publisher.address))).toBeInTheDocument();
});

Expand Down

0 comments on commit 1229c9a

Please sign in to comment.