pass run method into tasks

don't reach into lib for it

Original commit: elastic/kibana-plugin-helpers@d92d2e979a
This commit is contained in:
Joe Fleming 2016-12-14 17:03:57 -07:00
parent b85a68df15
commit f222c6e889
3 changed files with 3 additions and 5 deletions

View file

@ -6,6 +6,6 @@ module.exports = function run(name) {
// call the action function with the plugin, then all
// renaining arguments from commander
var plugin = pluginConfig();
action.apply(null, [plugin].concat([].slice.apply(arguments)));
action.apply(null, [plugin, run].concat([].slice.apply(arguments)));
};
};

View file

@ -1,4 +1,4 @@
module.exports = function (plugin, command) {
module.exports = function (plugin, run, command) {
var execFileSync = require('child_process').execFileSync;
var cmd = (process.platform === 'win32') ? 'bin\\kibana.bat' : 'bin/kibana';

View file

@ -1,6 +1,4 @@
var run = require('../../../lib/run');
module.exports = function testAllAction(plugin) {
module.exports = function testAllAction(plugin, run) {
run('test/server').call(null);
run('test/browser').call(null, { runOnce: true });
};