From af4951f3265bb474b93557c4f3cc78069727b5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 8 Jun 2020 06:35:05 +0200 Subject: [PATCH] Update test.mjs --- js/tests/test.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/tests/test.mjs b/js/tests/test.mjs index 219681ad..a183fe9d 100644 --- a/js/tests/test.mjs +++ b/js/tests/test.mjs @@ -74,7 +74,9 @@ const main = async () => { const tools = { eq, fail, wait, code, ctx } for (const [i, t] of tests.entries()) { try { - await t(tools) + if (!await t(tools)) { + throw Error('Test failed') + } } catch (err) { console.log(`test #${i} failed:\n${t.toString()}\n\nError:`) fatal(stackFmt(err, url))