From 7c110ce33f653551e6dae8eeab4e267001463d96 Mon Sep 17 00:00:00 2001 From: Tomasz Janczuk Date: Sat, 20 Sep 2014 13:56:53 -0700 Subject: [PATCH] fix unstable exception test --- test/201_patterns.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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(); }); });