summaryrefslogtreecommitdiff
path: root/test/async.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/async.test.js')
-rw-r--r--test/async.test.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/async.test.js b/test/async.test.js
index 65e446e..c4fbaf2 100644
--- a/test/async.test.js
+++ b/test/async.test.js
@@ -1,4 +1,4 @@
-var async = require("../");
+var async;
var assert = require("assert");
function isBrowser() {
@@ -6,8 +6,13 @@ function isBrowser() {
(process + "" !== "[object process]"); // browserify
}
+
suite("setImmediate", function () {
+ suiteSetup(function () {
+ async = require("../");
+ });
+
suiteSetup(function (done) {
setTimeout(done, 500);
});
@@ -47,7 +52,7 @@ suite("setImmediate", function () {
test("fast deferral (browser)", function (done) {
/* global performance */
- if (typeof performance === "undefined") {
+ if (typeof performance === "undefined" || !performance.now) {
console.log("no high resolution timers in this browser");
return done();
}