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
{{ message }}
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
<script>
describe('<some-element>', function () {varsomeElement;beforeEach(function(){someElement=fixture('SomeElementFixture');});});
</script>
This ends up calling restore() twice on the fixture, and seemingly creates the fixture again and again.
Would this not be preferable?:
<script>
describe('<some-element>', function () {varsomeElement=fixture('SomeElementFixture');;it('do some test',function(){// fixture is automatically restored in afterEach});});
</script>
The text was updated successfully, but these errors were encountered:
If you do it beforeEach() then you'll generate a new fixture before each test, you know the it() tests.
So that way you'll have a new fresh element to work with before each test unlike in your second example where you have the same element to use throughout all of the it() tests in that describe() group.
Every test it() group should have a fresh element to work with which your second example wouldn't achieve, it would have the same one to use throughout all of the describe() group.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is the example in the README:
This ends up calling
restore()
twice on the fixture, and seemingly creates the fixture again and again.Would this not be preferable?:
The text was updated successfully, but these errors were encountered: