How to use the cordova-lib.cordova.plugin function in cordova-lib

To help you get started, we’ve selected a few cordova-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cordova-cli / spec / cli.spec.js View on Github external
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');
            });
        });
github apache / cordova-cli / spec / cli.spec.js View on Github external
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');
            });
        });