Change QUnit fixture reset behavior #195

Merged
merged 1 commit into from Feb 14, 2012

Projects

None yet

2 participants

@conzett

Change for issue #194

Essentially, cache a clean copy of
the fixture node on load and replace subsequent fixture nodes with that.

On load, clone qunit-fixture element and set config.fixture equal to
that. Change the reset function to replace the entire qunit-fixture
element with a deep copy of the clone.

Added tests to check if properties on the fixture are cleared between
tests.

@conzett conzett Change fixture reset behavior
On load, set clone qunit-fixture element and set config.fixture equal to
that. Change the reset function to replace the entire qunit-fixture
element with a deep copy of the clone. Essentially, cache a clean copy of
the fixture node on load and replace subsequent fixture nodes with that.

Added tests to check if properties on the fixture are cleared between
tests.
b9010d4
@jzaefferer jzaefferer merged commit b9010d4 into jquery:master Feb 14, 2012
@jzaefferer
jQuery Foundation member

Thanks, landed.

@jzaefferer jzaefferer added a commit that referenced this pull request Feb 29, 2012
@jzaefferer jzaefferer Revert "Change fixture reset behavior", changing #194 and #195 to won…
…tfix.

This reverts commit b9010d4.

That change turned out to cause very sublte bugs in jQuery UI testsuites, where the browser form memory would cache values between testruns. Which doesn't happen with the previous reset implementation. Unfortunate, but not worth the trouble.
24a8f2b
@jzaefferer
jQuery Foundation member

I had to revert this patch, as it caused very subtle trouble downstream in jQuery UI. The type of failure is bad enough that I don't want anyone else to experience that again, so have to change this (and #194) to "wontfix". I will update the documentation accordingly.

For your particular case, just leave the fixture element as-is and use a wrapper or child.

@JamesMGreene JamesMGreene added a commit that referenced this pull request Mar 7, 2013
@jzaefferer jzaefferer Revert "Change fixture reset behavior", changing #194 and #195 to won…
…tfix.

This reverts commit b9010d4.

That change turned out to cause very sublte bugs in jQuery UI testsuites, where the browser form memory would cache values between testruns. Which doesn't happen with the previous reset implementation. Unfortunate, but not worth the trouble.
56e37ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment