diff options
-rw-r--r-- | test/jquery.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/jquery.js b/test/jquery.js index 33fa293d9..e43493967 100644 --- a/test/jquery.js +++ b/test/jquery.js @@ -26,7 +26,9 @@ label: "Load with AMD", tooltip: "Load the AMD jQuery file (and its dependencies)" }); - if ( QUnit.urlParams.amd && parent == window ) { + // If QUnit is on window, this is the main window + // This detection allows AMD tests to be run in an iframe + if ( QUnit.urlParams.amd && window.QUnit ) { require.config({ baseUrl: src }); src = "src/jquery"; // Include tests if specified |