Permalink
Browse files

Fix an exception type recognition problem in assertThrow() on WSH/IE.

  • Loading branch information...
1 parent 0711337 commit 19e64ef1930b28629236900d9309623e9cb12382 @jcoglan committed Jul 8, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/test/assertions.js
View
5 source/test/assertions.js
@@ -277,7 +277,10 @@ JS.Test.Unit.extend({
fullMessage = this.buildMessage(message, "<?> exception expected but was\n?", args, actualException);
this.assertBlock(fullMessage, function() {
- return expected.any(function(type) { return JS.isType(actualException, type) });
+ return expected.any(function(type) {
+ return JS.isType(actualException, type) || (actualException.name &&
+ actualException.name === type.name);
+ });
});
});
},

0 comments on commit 19e64ef

Please sign in to comment.