# @poi/plugin-karma

> Automatic (headless) browser testing with [Karma](https://karma-runner.github.io/latest/index.html).

Latest version **13.0.4** (published 2020-04-30) · 0 weekly downloads

## Install

```sh
npm install @poi/plugin-karma
pnpm add @poi/plugin-karma
yarn add @poi/plugin-karma
bun add @poi/plugin-karma
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 13.0.4 |
| Published | 2020-04-30 |
| First published | 2018-03-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | egoist, poi-owner, rem |

## Links

- npm: https://www.npmjs.com/package/@poi/plugin-karma
- npm.io page: https://npm.io/package/@poi/plugin-karma

## Dependencies (8)

- [karma](https://npm.io/package/karma.md) ^5.0.3
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.0.4
- [karma-jasmine](https://npm.io/package/karma-jasmine.md) ^2.0.1
- [karma-webpack](https://npm.io/package/karma-webpack.md) ^4.0.2
- [karma-coverage](https://npm.io/package/karma-coverage.md) ^1.1.2
- [karma-mocha-reporter](https://npm.io/package/karma-mocha-reporter.md) ^2.2.5
- [karma-chrome-launcher](https://npm.io/package/karma-chrome-launcher.md) ^2.2.0
- [istanbul-instrumenter-loader](https://npm.io/package/istanbul-instrumenter-loader.md) ^3.0.1

## Recent versions

- 13.0.4 (latest) — 2020-04-30
- 13.0.3-canary.585.f015dbf.0 (canary) — 2019-07-04
- 12.0.0-beta.1 (next) — 2018-12-02
- 12.0.0-alpha.2 (future) — 2018-11-28
- 13.0.3 — 2019-07-27
- 13.0.2 — 2019-01-22
- 13.0.1 — 2019-01-09
- 13.0.0 — 2019-01-09
- 12.0.3 — 2018-12-22
- 12.0.2 — 2018-12-22
- 12.0.1 — 2018-12-09
- 12.0.0 — 2018-12-08
- 12.0.0-beta.0 — 2018-12-02
- 12.0.0-alpha.7 — 2018-12-01
- 12.0.0-alpha.6 — 2018-11-30
- … 18 more at https://npm.io/package/@poi/plugin-karma/versions

## README

# @poi/plugin-karma

Automatic (headless) browser testing with [Karma](https://karma-runner.github.io/latest/index.html).

## Introduction

This plugin pre-configures [Karma](https://karma-runner.github.io/), [Jasmine](https://jasmine.github.io/) for you so that you can run the tests without any configurations.

## Install

```bash
yarn add @poi/plugin-karma --dev
```

## How to use

In your `poi.config.js`:

```js
module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-karma'
    }
  ]
}
```

This plugin injected a new command to Poi CLI: `poi test:unit` which is a command running in Poi's `test` mode.

To run it easier, you can configure this in npm scripts:

```json
{
  "name": "my-project",
  "scripts": {
    "test": "poi test:unit",
    "build": "poi --prod",
    "start": "poi --serve"
  },
  "devDependencies": {
    "poi": "^12.0.0"
  }
}
```

Now you can run `npm test` instead.

### Test File Patterns

By default this plugin use `**/*.{test,spec}.{js,ts}` (excluded `node_modules`) as test files, you can change this to any minimatch pattern (note the quotes to avoid shell expansion):

```bash
poi test:unit "**/*.spec.coffee"
```

### Coverage Report

Use `--coverage` flag to show code coverage and generate coverage report to `./coverage` folder.

### Watching Files

Use `--watch` flag to watch test files.

### Running on CI

To run your tests in Continuous Integration Platforms like CircleCI, you will need `Chrome` installed in your test environment.

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