Open
Description
I am writing a few tests that are changing some internal useState
variables of a composable.
However, I noticed that the state of that composable is kept between tests.
This breaks a primary principle of unit testing:
- tests should be isolated.
- tests should work in any order they are run (dependent on 1.)
Even applying
beforeEach(() => {
clearNuxtState();
}
the composable still keeps the state.