Permalink
Browse files

Add support for CommonJS.

  • Loading branch information...
1 parent 8cb7fdc commit 782caf294c0f33d96533388856ac336d8e8fd3e5 @scottgonzalez scottgonzalez committed Sep 7, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/qunit-extensions.js
View
@@ -1,6 +1,10 @@
(function( QUnit, undefined ) {
-window.wait = QUnit.wait = function( condition, then, timeout ) {
+var expose = typeof exports === "undefined" || typeof require === "undefined" ?
+ window :
+ exports;
+
+expose.wait = QUnit.wait = function( condition, then, timeout ) {
var timer;
if ( timeout ) {

0 comments on commit 782caf2

Please sign in to comment.