Skip to content

Commit 6cb8440

Browse files
authored
Stop testing wording of errors (#412)
Wording of errors varies greatly between e.g. Chrome and Firefox
1 parent 420bf72 commit 6cb8440

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

exercises/09.errors/01.solution.composition/error-boundary.test.ts

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ await testStep(
1111
expect(errorMessage).toBeDefined()
1212
expect(errorMessage.textContent).toContain('There was an error:')
1313

14-
// Check if the error message contains the specific error
15-
const errorDetails = await screen.findByText(/invalid time/i)
16-
expect(errorDetails).toBeDefined()
17-
1814
// Ensure the form is not rendered
1915
const form = screen.queryByRole('form')
2016
expect(form).toBeNull()

exercises/09.errors/02.solution.show-boundary/error-boundary.test.ts

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ await testStep('Error boundary is rendered after form submission', async () => {
1515
expect(errorMessage).toBeDefined()
1616
expect(errorMessage.textContent).toContain('There was an error:')
1717

18-
// Check if the error message contains the specific error
19-
const errorDetails = await screen.findByText(/toUpperCase/i)
20-
expect(errorDetails).toBeDefined()
21-
2218
// Ensure the form is not rendered after error
2319
const form = screen.queryByRole('form')
2420
expect(form).toBeNull()

exercises/09.errors/03.solution.reset/error-boundary.test.ts

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ await testStep('Error boundary is rendered after form submission', async () => {
1515
expect(errorMessage).toBeDefined()
1616
expect(errorMessage.textContent).toContain('There was an error:')
1717

18-
// Check if the error message contains the specific error
19-
const errorDetails = await screen.findByText(/toUpperCase/i)
20-
expect(errorDetails).toBeDefined()
21-
2218
// Ensure the form is not rendered after error
2319
const form = screen.queryByRole('form')
2420
expect(form).toBeNull()

0 commit comments

Comments
 (0)