Closed hananmalka closed 2 years ago
I have a jest setup file which contains a group of actions to run in beforeEach():
global.beforeEach(async () => { console.log("Hello World") });
In my tests file I have several tests from different groups(sanity/regression etc') The groups defined in test level and not in describe level.
When running one of the groups, the global.beforeEach() is running for the other group as well.
My expectation is that global.beforeEach will run only for the relevant group.
global.beforeEach
Is there a way to do it?
@hananmalka unfortunately, you can't use groups per test/describe level. You can define groups per file only.
I have a jest setup file which contains a group of actions to run in beforeEach():
In my tests file I have several tests from different groups(sanity/regression etc') The groups defined in test level and not in describe level.
When running one of the groups, the global.beforeEach() is running for the other group as well.
My expectation is that
global.beforeEach
will run only for the relevant group.Is there a way to do it?