karma-fixture icon indicating copy to clipboard operation
karma-fixture copied to clipboard

Create new fixture container on cleanup

Open hdodov opened this issue 5 years ago • 0 comments

I noticed that the cleanup() method simply empties the fixture.el element. Wouldn't it make more sense to create a completely new container instead? In my case, the fixture container ends up with some state data that I don't want to remain for the rest of the tests.

I changed this line to this:

return this.el = document.createElement('div')

And it seems to work great. I don't see a reason to share the fixture container between tests.

hdodov avatar Dec 23 '19 14:12 hdodov