-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestAll.js
More file actions
23 lines (20 loc) · 848 Bytes
/
testAll.js
File metadata and controls
23 lines (20 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
// Test All of the modules within /lib
//
const path = require('path');
const fs = require('fs');
(function findTests() {
fs.readdirSync(path.join(__dirname, 'src'), { withFileTypes: true }).forEach(function (file) {
if (file.isDirectory() === true) {
try {
console.log('===========================================================================');
console.log('=== testAll running: ', path.join(__dirname, 'lib', file.name, 'test.js'));
console.log('===========================================================================');
require(path.join(__dirname, 'lib', file.name, 'test.js'));
} catch (e) {
console.error('findTests() failed with error: ', e);
return null;
}
}
});
})();