# karma-cordova-launcher-z

> A Karma plugin. Launch on Apache Cordova

Latest version **0.0.10** (published 2017-01-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install karma-cordova-launcher-z
pnpm add karma-cordova-launcher-z
yarn add karma-cordova-launcher-z
bun add karma-cordova-launcher-z
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2017-01-26 |
| First published | 2017-01-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Raymond Cheng |
| Maintainers | cesarzagonel |
| Keywords | karma-plugin, karma-launcher, cordova |

## Links

- npm: https://www.npmjs.com/package/karma-cordova-launcher-z
- Repository: https://github.com/cesarzagonel/karma-cordova-launcher
- Homepage: https://github.com/cesarzagonel/karma-cordova-launcher#readme
- Issues: https://github.com/cesarzagonel/karma-cordova-launcher/issues
- npm.io page: https://npm.io/package/karma-cordova-launcher-z

## Dependencies (3)

- [q](https://npm.io/package/q.md) ~0.9.6
- [ncp](https://npm.io/package/ncp.md) ^0.5.1
- [child-process-promise](https://npm.io/package/child-process-promise.md) ^0.2.0-SNAPSHOT.1389671754086

## Recent versions

- 0.0.10 (latest) — 2017-01-26

## README

karma-cordova-launcher
======================

> Run your unit tests on Android, iOS, etc using [Apache Cordova](https://cordova.apache.org/)

## Installation

Install `karma-cordova-launcher` as a `devDependency` in your package.json:

```bash
npm install karma-cordova-launcher --save-dev
```

Note: This plugin currently depends on `cordova` being on your PATH.
You can install `cordova` globally by:

```bash
npm install -g cordova
```

## Usage

This launcher is typically used to test your unit tests locally on a mobile device emulator.
It is expected that you are already familiar with Karma when configuring this launcher, so if you are new to Karma, head over to the [Karma website](http://karma-runner.github.io/).

### Adding karma-cordova-launcher to an existing Karma config

To configure this launcher, you need to add the `cordovaSettings` property to your top-level Karma config.
The `browsers` array needs to include `Cordova`.

The `cordovaSettings` object defines global settings for Cordova.
Here is a sample Karma config to get the launcher running:

```js
module.exports = function(config) {
  // Example set of mobile platforms to run on Cordova
  config.set({
    // The rest of your karma config is here
    // ...
    cordovaSettings: {
      platforms: ['android', 'ios'],
	  mode: 'emulate',
      hostip: '10.0.2.2',
      target: '0468de2a213eae29',
      plugins: [
        'org.apache.cordova.console'
      ]
    },
    browsers: ['Cordova'],
    reporters: ['dots', 'progress']
    singleRun: true
  });
};
```
mode can be either 'run' or 'emulate' (emulate by default), target is used to specify a target device (optional), hostip is the ip of the machine running the karma server as accessible from the emualted/physical device (the default one used by the Android emulator is used by default, for Genymotion use 10.0.3.2).

### Example karma-cordova-launcher configs

For example configs using this launcher, check out the Grunt and Karma configuration for
[freedom-for-chrome](https://github.com/freedomjs/freedom-for-chrome)

## `cordovaSettings` config properties

### platforms
Type: Array of `String`
Default: `[]`

An array of Cordova platforms to test on. For valid values, see
[Cordova Platform Support](http://cordova.apache.org/docs/en/3.4.0/guide_support_index.md.html#Platform%20Support)

### plugins
Type: Array of `String`
Default: `[]`

An array of Cordova plugins to install. For valid plugins, see the
[Cordova Plugins Registry](http://plugins.cordova.io/#/)

## Runtime FAQ
* What platforms have been tested?
  - Android L on Ubuntu 14.04LTS with Cordova 3.5.0
  - Must set an SD card and "Use Host GPU" in device settings
* Where is the Cordova project generated?
  - The project is stored here: `/tmp/cordova_test/`. Delete it to start fresh

---
_Source: https://npm.io/package/karma-cordova-launcher-z · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
