Created
July 16, 2010 19:18
-
-
Save fitzgen/478793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
test = test || null, | |
ok = ok || null, | |
deepEqual = deepEqual || null, | |
assert = null; | |
// If we are not running in Qunit in the browser, create a shim from the Qunit API | |
// to the CommonJS API. | |
if (typeof exports !== "undefined") { | |
assert = require("assert"); | |
test = function (msg, fn) { | |
if (typeof fn === "number") { | |
fn = arguments[2]; | |
} | |
exports[msg] = fn; | |
}; | |
ok = assert.ok; | |
deepEqual = assert.deepEqual; | |
} | |
// ... Snip ... | |
// Run the Common JS Test Runner | |
if (typeof exports !== "undefined") { | |
require("os").exit(require("test").run(exports)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment