Skip to content

Commit

Permalink
Remove async where there's no await
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Dec 21, 2022
1 parent dcf4b20 commit 5efdbed
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/components/src/border-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const clearWidthInput = () => setWidthInput( '' );

describe( 'BorderControl', () => {
describe( 'basic rendering', () => {
it( 'should render standard border control', async () => {
it( 'should render standard border control', () => {
const props = createProps();
render( <BorderControl { ...props } /> );

Expand All @@ -115,7 +115,7 @@ describe( 'BorderControl', () => {
expect( slider ).not.toBeInTheDocument();
} );

it( 'should hide label', async () => {
it( 'should hide label', () => {
const props = createProps( { hideLabelFromVision: true } );
render( <BorderControl { ...props } /> );
const label = screen.getByText( props.label );
Expand All @@ -129,15 +129,15 @@ describe( 'BorderControl', () => {
);
} );

it( 'should render with slider', async () => {
it( 'should render with slider', () => {
const props = createProps( { withSlider: true } );
render( <BorderControl { ...props } /> );

const slider = getSliderInput();
expect( slider ).toBeInTheDocument();
} );

it( 'should render placeholder in UnitControl', async () => {
it( 'should render placeholder in UnitControl', () => {
const props = createProps( { placeholder: 'Mixed' } );
render( <BorderControl { ...props } /> );

Expand Down Expand Up @@ -200,7 +200,7 @@ describe( 'BorderControl', () => {

describe( 'color and style picker aria labels', () => {
describe( 'with style selection enabled', () => {
it( 'should include both color and style in label', async () => {
it( 'should include both color and style in label', () => {
const props = createProps( { value: undefined } );
render( <BorderControl { ...props } /> );

Expand All @@ -209,7 +209,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe named color selection', async () => {
it( 'should correctly describe named color selection', () => {
const props = createProps( { value: { color: '#72aee6' } } );
render( <BorderControl { ...props } /> );

Expand All @@ -220,7 +220,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe custom color selection', async () => {
it( 'should correctly describe custom color selection', () => {
const props = createProps( { value: { color: '#4b1d80' } } );
render( <BorderControl { ...props } /> );

Expand All @@ -231,7 +231,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe named color and style selections', async () => {
it( 'should correctly describe named color and style selections', () => {
const props = createProps( {
value: { color: '#72aee6', style: 'dotted' },
} );
Expand All @@ -244,7 +244,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe custom color and style selections', async () => {
it( 'should correctly describe custom color and style selections', () => {
const props = createProps( {
value: { color: '#4b1d80', style: 'dashed' },
} );
Expand All @@ -259,7 +259,7 @@ describe( 'BorderControl', () => {
} );

describe( 'with style selection disabled', () => {
it( 'should only include color in the label', async () => {
it( 'should only include color in the label', () => {
const props = createProps( {
value: undefined,
enableStyle: false,
Expand All @@ -271,7 +271,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe named color selection', async () => {
it( 'should correctly describe named color selection', () => {
const props = createProps( {
value: { color: '#72aee6' },
enableStyle: false,
Expand All @@ -285,7 +285,7 @@ describe( 'BorderControl', () => {
).toBeInTheDocument();
} );

it( 'should correctly describe custom color selection', async () => {
it( 'should correctly describe custom color selection', () => {
const props = createProps( {
value: { color: '#4b1d80' },
enableStyle: false,
Expand All @@ -302,7 +302,7 @@ describe( 'BorderControl', () => {
} );

describe( 'onChange handling', () => {
it( 'should update width with slider value', async () => {
it( 'should update width with slider value', () => {
const props = createProps( { withSlider: true } );
const { rerender } = render( <BorderControl { ...props } /> );

Expand Down

1 comment on commit 5efdbed

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3750954644
📝 Reported issues:

Please sign in to comment.