[Pkg-javascript-commits] [node-async] 75/480: updated unit tests for node 0.3.8
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit 44712546b48cc1f858e16cedd0060ab8e97bdb22
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date: Tue Feb 8 17:56:10 2011 +0000
updated unit tests for node 0.3.8
---
test/test-async.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/test/test-async.js b/test/test-async.js
index 38edb72..4f5648f 100644
--- a/test/test-async.js
+++ b/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();
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list