From 112668bd4e11bdf7b28b7c9c798fce4d64466332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marin=20Petruni=C4=87?= Date: Mon, 14 Dec 2020 10:13:56 +0100 Subject: [PATCH] fix silent pass if no spec tests --- test/switch.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/switch.ts b/test/switch.ts index c86f143..bf82449 100644 --- a/test/switch.ts +++ b/test/switch.ts @@ -26,12 +26,18 @@ export async function runForAllImplementations( export function describeForAllImplementations(callback: (bls: IBls) => void): void { runForAllImplementations((bls, implementation) => { - describe(implementation, () => { + describe(implementation, function () { before(async () => { await bls.init(); }); - callback(bls); + try { + callback(bls); + } catch (e) { + it("Error generating test cases", function (done) { + done(e); + }); + } }); }); }