Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return cli(['node', 'cordova', 'plugin', 'add', 'facebook', '--nohooks', 'before_plugin_add']).then(() => {
expect(cordova.plugin).toHaveBeenCalledWith(
'add',
['facebook'],
jasmine.any(Object)
);
const opts = cordova.plugin.calls.argsFor(0)[2];
expect(opts.nohooks[0]).toBe('before_plugin_add');
});
});
return cli(['node', 'cordova', 'plugin', 'add', 'facebook', '--variable', 'FOO=foo']).then(() => {
expect(cordova.plugin).toHaveBeenCalledWith(
'add',
['facebook'],
jasmine.any(Object)
);
const opts = cordova.plugin.calls.argsFor(0)[2];
expect(opts.cli_variables.FOO).toBe('foo');
});
});