if plugins are specified, use the option value instead of the default

Original commit: elastic/kibana-plugin-helpers@d610c9c9d6
This commit is contained in:
Joe Fleming 2016-12-15 12:40:55 -07:00
parent 47595e7bdd
commit beb4b33f62

View file

@ -4,10 +4,15 @@ module.exports = function testBrowserAction(plugin, run, command) {
command = command || {};
var kbnServerArgs = [
'--kbnServer.testsBundle.pluginId=' + plugin.id,
'--kbnServer.plugin-path=' + plugin.root
];
if (command.plugins) {
kbnServerArgs.push('--kbnServer.testsBundle.pluginId=' + command.plugins);
} else {
kbnServerArgs.push('--kbnServer.testsBundle.pluginId=' + plugin.id);
}
var cmd = 'npm';
var task = (command.dev) ? 'test:dev' : 'test:browser';
var args = ['run', task, '--'].concat(kbnServerArgs);