1
0
Fork 0

Corrected combine-test throws and doesNotThrow assertions

Did not properly permit empty second argument
perfodd
Mike Gerwitz 2014-02-02 22:20:11 -05:00
parent 84dd6757bb
commit ff07b4f456
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,8 @@ module.assert = { exports: {
'throws': function ( test, expected, err ) 'throws': function ( test, expected, err )
{ {
expected = expected || Error;
try try
{ {
test(); test();
@ -148,6 +150,8 @@ module.assert = { exports: {
doesNotThrow: function ( test, not_expected, err ) doesNotThrow: function ( test, not_expected, err )
{ {
not_expected = not_expected || Error;
try try
{ {
test(); test();