update test suite to pass "Check for Globals" in most environments #1016

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Member

gibson042 commented Nov 3, 2012

A continuation in my recent line of meta-testing, this pull request might merit some discussion before landing. But it's really gratifying to see no tests leak global variables, even in IE6. 😄

Member

mikesherov commented Nov 3, 2012

I'm doing similar work in jquery-ui right now, so you don't have to sell me on the merits of not leaking globals. Nice to see more attention being paid to the platform.

@timmywil timmywil commented on the diff Nov 5, 2012

test/data/testrunner.js
@@ -3,6 +3,11 @@
*/
jQuery.noConflict();
+// For checking globals pollution
+window[ jQuery.expando ] = undefined;
+// ...in Gecko
+this.getInterface = this.getInterface;
@timmywil

timmywil Nov 5, 2012

Owner

What does this do?

@gibson042

gibson042 Nov 5, 2012

Member

Ensures that the Gecko-specific method is always defined ahead of time so QUnit doesn't bitch about it being "created" when running in Firefox etc.

gibson042 closed this in 81b094b Nov 5, 2012

@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014

@gibson042 gibson042 No ticket: update test suite to pass QUnit globals check in most envi…
…ronments. Close gh-1016.
38e21a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment