1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-28 07:50:55 +02:00
keeweb/test/index.js
2020-11-26 23:34:08 +01:00

15 lines
416 B
JavaScript

function requireAll(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$/));