From ff07b4f456bf45aa23ba7467ca6768b71157be54 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 2 Feb 2014 22:20:11 -0500 Subject: [PATCH] Corrected combine-test throws and doesNotThrow assertions Did not properly permit empty second argument --- tools/combine-test.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/combine-test.tpl b/tools/combine-test.tpl index 985d857..5ad3b62 100644 --- a/tools/combine-test.tpl +++ b/tools/combine-test.tpl @@ -132,6 +132,8 @@ module.assert = { exports: { 'throws': function ( test, expected, err ) { + expected = expected || Error; + try { test(); @@ -148,6 +150,8 @@ module.assert = { exports: { doesNotThrow: function ( test, not_expected, err ) { + not_expected = not_expected || Error; + try { test();