Skip to content

Commit

Permalink
Simplify required assertion on example
Browse files Browse the repository at this point in the history
  • Loading branch information
diogob committed Nov 16, 2022
1 parent f93d773 commit 9d6434d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/web/tests/setup/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ class Example {
`label-for-${field.name}`,
)

required
? await expect(field.input).toHaveAttribute('aria-required', 'true')
: await expect(field.input).not.toHaveAttribute('aria-required', 'true')
await expect(field.input).toHaveAttribute('aria-required', String(required))
}

async expectSelect(field: Field, options: FieldOptions = {}) {
Expand Down

0 comments on commit 9d6434d

Please sign in to comment.