We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41f842a commit 8e9950eCopy full SHA for 8e9950e
packages/jest-circus/src/utils.ts
@@ -161,7 +161,7 @@ export const getEachHooksForTest = (test: Circus.TestEntry): TestHooks => {
161
}
162
// 'beforeEach' hooks are executed from top to bottom, the opposite of the
163
// way we traversed it.
164
- result.beforeEach = [...beforeEachForCurrentBlock, ...result.beforeEach];
+ result.beforeEach.unshift(...beforeEachForCurrentBlock);
165
} while ((block = block.parent));
166
return result;
167
};
0 commit comments