Skip to content
Permalink
Browse files

Use window.QUnit to detect the top window when loading with AMD

  • Loading branch information
timmywil committed Aug 29, 2013
1 parent 01d5a1a commit ca1c90e55c05610c28a176e3bcb2a64450b5e296
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit ca1c90e

Please sign in to comment.
You can’t perform that action at this time.