Skip to content

Commit

Permalink
Fix broken test by passing the missing value
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Apr 29, 2022
1 parent 54379dc commit 8929d0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/components/src/unit-control/test/index.tsx
Expand Up @@ -132,10 +132,14 @@ describe( 'UnitControl', () => {
} );

it( 'should render label if single units', () => {
render( <UnitControl units={ [ { value: '%', label: '%' } ] } /> );
render(
<UnitControl
units={ [ { value: '%', label: '%' } ] }
value="30%"
/>
);

const select = screen.queryByRole( 'combobox' );
// The unit is not being displayed!
const label = screen.getByText( '%' );

expect( select ).not.toBeInTheDocument();
Expand Down

0 comments on commit 8929d0b

Please sign in to comment.