Skip to content

Commit

Permalink
Adding BeforeAll and AfterAll hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
VidhiRambhia committed Nov 6, 2023
1 parent ba4dc23 commit d9a2b69
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/browser-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,6 @@ export default function createTests(
const tags = collectTagNames(pickle.tags);
const beforeHooks = registry.resolveBeforeHooks(tags);
const afterHooks = registry.resolveAfterHooks(tags);
const beforeAllHooks = registry.resolveBeforeAllHooks();
const afterAllHooks = registry.resolveAfterAllHooks();
const hooksToStep = (hook: IHook): messages.TestStep => {
return {
id: createTestStepId({
Expand Down Expand Up @@ -1090,11 +1088,9 @@ export default function createTests(
id: pickle.id,
pickleId: pickle.id,
testSteps: [
...beforeAllHooks.map(hooksToStep),
...beforeHooks.map(hooksToStep),
...pickle.steps.map(pickleStepToTestStep),
...afterHooks.map(hooksToStep),
...afterAllHooks.map(hooksToStep)
...afterHooks.map(hooksToStep)
],
};
});
Expand Down

0 comments on commit d9a2b69

Please sign in to comment.