From abe1ef2f3fdfaf8c12a28af4abdcfc9057b8410c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Thu, 4 Jan 2018 00:56:06 +0100 Subject: [PATCH] Fix AssertionError detection for node > 6 --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index 3a17e3c..f751076 100644 --- a/test.js +++ b/test.js @@ -41,7 +41,7 @@ function Test(name, unit, logger, Assert) { if (isSync) assert.end() } } catch (exception) { - if (ERR_EXPECT === exception.name) assert.fail(exception) + if (exception.name && exception.name.startsWith(ERR_EXPECT)) assert.fail(exception) else logger.error(exception) assert.end() }