kibana-123
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
30 lines (24 loc) • 1.01 kB
JavaScript
import fs from 'fs';
import path from 'path';
export default function checkPlugins(grunt) {
grunt.registerTask('checkPlugins', 'Checks for plugins which may disrupt tests', function checkPlugins() {
const done = this.async();
const pluginsDir = path.resolve('./plugins/');
fs.readdir(pluginsDir, (err, files) => {
if (!files) {
return done();
}
const plugins = files.filter(file => {
return fs.statSync(path.join(pluginsDir, file)).isDirectory();
});
if (plugins.length) {
grunt.log.error('===================================================================================================');
plugins.forEach(plugin => {
grunt.log.error(`The ${plugin} plugin may disrupt the test process. Consider removing it and re-running your tests.`);
});
grunt.log.error('===================================================================================================');
}
done();
});
});
}