You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a beforeEach that loads a fixture and then several it statements that use that data to create a model.
The logic i'm testing modifies the mock data object that's created by the fixture load and i've noticed that this modification persists from one it to the next. I've tried using cleanup() in an afterEach but it makes no difference.
I'm presuming that once the json fixture is loaded it's cached as an object and that same objects is returned. So any modification to that object then persists. Unless i'm doing something wrong?
I have a
beforeEach
that loads a fixture and then severalit
statements that use that data to create a model.The logic i'm testing modifies the mock data object that's created by the fixture load and i've noticed that this modification persists from one
it
to the next. I've tried usingcleanup()
in anafterEach
but it makes no difference.I'm presuming that once the json fixture is loaded it's cached as an object and that same objects is returned. So any modification to that object then persists. Unless i'm doing something wrong?
The text was updated successfully, but these errors were encountered: