@@ -578,7 +578,18 @@ wrong = "property"
578578 await writeWebConfiguration ( { webDirectory : anotherWebDirectory , role : 'backend' } )
579579
580580 // Then
581- await expect ( loadTestingApp ( ) ) . rejects . toThrow ( )
581+ try {
582+ await loadTestingApp ( )
583+ expect . fail ( 'Expected loadTestingApp to throw an error' )
584+ } catch ( error ) {
585+ if ( ! ( error instanceof AbortError ) ) {
586+ throw error
587+ }
588+ expect ( error . message ) . toContain ( 'You can only have one "web" configuration file with the [33mbackend[39m role' )
589+ expect ( error . message ) . toContain ( 'Conflicting configurations found at:' )
590+ expect ( error . message ) . toContain ( joinPath ( webDirectory , configurationFileNames . web ) )
591+ expect ( error . message ) . toContain ( joinPath ( anotherWebDirectory , configurationFileNames . web ) )
592+ }
582593 } )
583594
584595 test ( 'throws an error if there are multiple frontends' , async ( ) => {
@@ -590,7 +601,18 @@ wrong = "property"
590601 await writeWebConfiguration ( { webDirectory : anotherWebDirectory , role : 'frontend' } )
591602
592603 // Then
593- await expect ( loadTestingApp ( ) ) . rejects . toThrow ( )
604+ try {
605+ await loadTestingApp ( )
606+ expect . fail ( 'Expected loadTestingApp to throw an error' )
607+ } catch ( error ) {
608+ if ( ! ( error instanceof AbortError ) ) {
609+ throw error
610+ }
611+ expect ( error . message ) . toContain ( 'You can only have one "web" configuration file with the [33mfrontend[39m role' )
612+ expect ( error . message ) . toContain ( 'Conflicting configurations found at:' )
613+ expect ( error . message ) . toContain ( joinPath ( webDirectory , configurationFileNames . web ) )
614+ expect ( error . message ) . toContain ( joinPath ( anotherWebDirectory , configurationFileNames . web ) )
615+ }
594616 } )
595617
596618 test ( 'loads the app with custom located web blocks' , async ( ) => {
0 commit comments