Skip to content

Commit

Permalink
Core: QUnit.start does not require calliing QUnit.load
Browse files Browse the repository at this point in the history
Fixes gh-1081

Before this patch, calling QUnit.load() (before or after QUnit.start)
to run the test suite in non-browser environments.
  • Loading branch information
leobalter committed Dec 14, 2016
1 parent 8edefa2 commit 967c721
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ extend( QUnit, {
} else if ( config.autostart ) {
throw new Error( "Called start() outside of a test context when " +
"QUnit.config.autostart was true" );
} else if ( !defined.document && !config.pageLoaded ) {

// Starts from Node even if .load was not previously called
QUnit.load();
} else if ( !config.pageLoaded ) {

// The page isn't completely loaded yet, so bail out and let `QUnit.load` handle it
Expand Down

0 comments on commit 967c721

Please sign in to comment.