diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index 9776072964b0..c259aad3da03 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -161,7 +161,7 @@ export const getEachHooksForTest = (test: Circus.TestEntry): TestHooks => { } // 'beforeEach' hooks are executed from top to bottom, the opposite of the // way we traversed it. - result.beforeEach = [...beforeEachForCurrentBlock, ...result.beforeEach]; + result.beforeEach.unshift(...beforeEachForCurrentBlock); } while ((block = block.parent)); return result; };