Skip to content

Commit

Permalink
Don't treat 'null' as an error when passed to async test callbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Oct 31, 2013
1 parent 5a22d2d commit a26ea1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/test/async_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Test.extend({
},

__runNextStep__: function(error) {
if (typeof error === 'object') return this.addError(error);
if (typeof error === 'object' && error !== null) return this.addError(error);

var step = this.__stepQueue__.shift(), n;

Expand Down
2 changes: 1 addition & 1 deletion source/test/unit/test_case.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Test.Unit.extend({

if (typeof asyncResult === 'string') asyncResult = new Error(asyncResult);

if (typeof asyncResult === 'object')
if (typeof asyncResult === 'object' && asyncResult !== null)
onUncaughtError(asyncResult);
else if (typeof asyncResult === 'function')
self.exec(asyncResult, onSuccess, onError);
Expand Down

0 comments on commit a26ea1f

Please sign in to comment.