diff --git a/test/index.js b/test/index.js
index 29da6f70..c3f3c8e8 100644
--- a/test/index.js
+++ b/test/index.js
@@ -1,4 +1,14 @@
function requireAll(req) {
- req.keys().forEach(req);
+ req.keys().forEach((mod) => {
+ try {
+ req(mod);
+ } catch (ex) {
+ // eslint-disable-next-line no-console
+ console.error('Error while running test', mod, ex.toString());
+ if ('testErrors' in global) {
+ global.testErrors++;
+ }
+ }
+ });
}
requireAll(require.context('test/src/', true, /\.js$/));
diff --git a/test/runner.html b/test/runner.html
index 4977c9b3..ba6cea9c 100644
--- a/test/runner.html
+++ b/test/runner.html
@@ -23,11 +23,15 @@