setup/teardown functions like beforeEach
should be isolated to test
#4120
Trinovantes
started this conversation in
Ideas
Replies: 2 comments
-
Respected test's fixture (so, if a declares "foo", and b declares "bar", then it will be |
Beta Was this translation helpful? Give feedback.
0 replies
-
If not mistaken, this is how jest designs it and its more intuitive as we want to be able to isolate to tests. afterEach is important too. (Y) to proposed solution, something along the lines of
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think functions like
beforeEach
should be moved undertest
so thattest.extend
makes senseI think right now both tests will execute the
beforeEach
but I think it would be nice to have more fine-grained control over who executes that block as well as being able to automatically infer the types of the fixturesThis will make the API consistent with playwright that many people use for e2e testing. It would be nice for all tests in the project to have consistent syntax (playwright only supports
test.beforeEach
).Beta Was this translation helpful? Give feedback.
All reactions