File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -819,7 +819,6 @@ export async function runSuite(suite: Suite, runner: VitestRunner): Promise<void
819819 updateTask ( 'suite-finished' , suite , runner )
820820 }
821821 else {
822- let beforeAllError : unknown
823822 let suiteRan = false
824823
825824 try {
@@ -837,10 +836,9 @@ export async function runSuite(suite: Suite, runner: VitestRunner): Promise<void
837836 ) )
838837 }
839838 catch ( e ) {
840- beforeAllError = e
841- failTask ( suite . result ! , beforeAllError , runner . config . diffOptions )
839+ failTask ( suite . result ! , e , runner . config . diffOptions )
842840 markTasksAsSkipped ( suite , runner )
843- throw e
841+ return
844842 }
845843
846844 // run suite children
@@ -895,10 +893,7 @@ export async function runSuite(suite: Suite, runner: VitestRunner): Promise<void
895893 if ( ! suiteRan ) {
896894 markTasksAsSkipped ( suite , runner )
897895 }
898- // don't push beforeAll error again - it was already pushed to preserve the order of beforeAll/afterAll
899- if ( e !== beforeAllError ) {
900- failTask ( suite . result ! , e , runner . config . diffOptions )
901- }
896+ failTask ( suite . result ! , e , runner . config . diffOptions )
902897 }
903898
904899 if ( suite . mode === 'run' || suite . mode === 'queued' ) {
You can’t perform that action at this time.
0 commit comments