module.exports.setPluginSpec = function()

in spec/helpers.js [135:150]


module.exports.setPluginSpec = function (appPath, plugin, spec) {
    appPath = getConfigPath(appPath);
    const parser = new ConfigParser(appPath);
    const p = parser.getPlugin(plugin);
    let variables = [];

    if (p) {
        parser.removePlugin(p.name);
        if (p.variables.length && p.variables.length > 0) {
            variables = p.variables;
        }
    }

    parser.addPlugin({ name: plugin, spec }, variables);
    parser.write();
};