mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
22 lines
540 B
JavaScript
22 lines
540 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
const path = require('path');
|
||
|
|
const fs = require('fs');
|
||
|
|
const db = require('./mocks/databasemock');
|
||
|
|
|
||
|
|
const installedPlugins = fs.readdirSync(path.join(__dirname, '../node_modules'))
|
||
|
|
.filter(p => p.startsWith('nodebb-'));
|
||
|
|
|
||
|
|
describe('Installed Plugins', function () {
|
||
|
|
installedPlugins.forEach((plugin) => {
|
||
|
|
const pathToTests = path.join(__dirname, '../node_modules', plugin, 'test');
|
||
|
|
try {
|
||
|
|
require(pathToTests);
|
||
|
|
} catch (err) {
|
||
|
|
if (err.code !== 'MODULE_NOT_FOUND') {
|
||
|
|
console.log(err.stack);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|