Skip to content

Commit b1157d9

Browse files
committed
Fix linting on use-auth-modal.test.js
1 parent ef654db commit b1157d9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

packages/template-retail-react-app/app/hooks/use-auth-modal.test.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,13 @@ test('Allows customer to sign in to their account', async () => {
139139
user.click(screen.getByText(/sign in/i))
140140

141141
// wait for successful toast to appear
142-
await waitFor(() => {
143-
expect(screen.getByText(/Welcome Tester/i)).toBeInTheDocument()
144-
expect(screen.getByText(/you're now signed in/i)).toBeInTheDocument()
145-
}, {timeout: 20000})
142+
await waitFor(
143+
() => {
144+
expect(screen.getByText(/Welcome Tester/i)).toBeInTheDocument()
145+
expect(screen.getByText(/you're now signed in/i)).toBeInTheDocument()
146+
},
147+
{timeout: 20000}
148+
)
146149
})
147150

148151
test('Renders error when given incorrect log in credentials', async () => {
@@ -235,7 +238,10 @@ test('Allows customer to create an account', async () => {
235238
user.paste(withinForm.getAllByLabelText(/password/i)[0], 'Password!1')
236239
user.click(withinForm.getByText(/create account/i))
237240

238-
await waitFor(() => {
239-
expect(screen.getAllByText(/customer@test.com/i).length).toEqual(1)
240-
}, {timeout: 20000})
241+
await waitFor(
242+
() => {
243+
expect(screen.getAllByText(/customer@test.com/i).length).toEqual(1)
244+
},
245+
{timeout: 20000}
246+
)
241247
})

0 commit comments

Comments
 (0)