Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated unit tests for node 0.3.8

  • Loading branch information...
commit 44712546b48cc1f858e16cedd0060ab8e97bdb22 1 parent d0be8cd
@caolan caolan authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 test/test-async.js
View
18 test/test-async.js
@@ -861,17 +861,17 @@ var console_fn_tests = function(name){
};
}
+ // browser-only test
exports[name + ' without console.' + name] = function(test){
- if (typeof global === 'undefined') {
- global = window;
+ if (typeof window !== 'undefined') {
+ var _console = window.console;
+ window.console = undefined;
+ var fn = function(callback){callback(null, 'val');};
+ var fn_err = function(callback){callback('error');};
+ async[name](fn);
+ async[name](fn_err);
+ window.console = _console;
}
- var _console = global.console;
- global.console = undefined;
- var fn = function(callback){callback(null, 'val');};
- var fn_err = function(callback){callback('error');};
- async[name](fn);
- async[name](fn_err);
- global.console = _console;
test.done();
};
Please sign in to comment.
Something went wrong with that request. Please try again.