Skip to content

Commit

Permalink
test(OverviewBlock): wrap test with a describe function
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusbzerra committed Jun 26, 2023
1 parent 7409969 commit 5d51c75
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/picasso/src/OverviewBlock/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ describe('overview-block', () => {
expect(spiedOnTitleCase).toHaveBeenCalledTimes(0)
})

it('renders custom label', () => {
const customLabel = <div data-testid='custom-label'>Custom Label</div>
describe('when label is a ReactNode', () => {
it('renders custom label', () => {
const customLabel = <div data-testid='custom-label'>Custom Label</div>

const { getByTestId } = renderOverviewBlock({
value: 'abc dk9',
label: customLabel,
})
const { getByTestId } = renderOverviewBlock({
value: 'abc dk9',
label: customLabel,
})

expect(getByTestId('custom-label')).toBeInTheDocument()
expect(getByTestId('custom-label')).toBeInTheDocument()
})
})

describe('when OnClick function is defined', () => {
Expand Down

0 comments on commit 5d51c75

Please sign in to comment.