diff --git a/test/201_patterns.js b/test/201_patterns.js index f5935e9a..cbd8d642 100644 --- a/test/201_patterns.js +++ b/test/201_patterns.js @@ -90,16 +90,8 @@ describe('call patterns', function () { var lambda = func(null, true); assert.equal(typeof lambda, 'function'); lambda(null, function (error, result) { - assert.throws( - function () { throw error; }, - function (error) { - if ((error instanceof Error) && error.Message.match(/Test .NET exception/)) { - return true; - } - return false; - }, - 'Unexpected result' - ); + assert.ok(error instanceof Error); + assert.ok(error.Message.match(/Test .NET exception/)); done(); }); });