# karma-chai-plugins

> Chai browser plugins set for Karma

Latest version **0.9.0** (published 2017-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-chai-plugins
pnpm add karma-chai-plugins
yarn add karma-chai-plugins
bun add karma-chai-plugins
```

## 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.9.0 |
| Published | 2017-04-12 |
| First published | 2013-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Eugene Datsky |
| Maintainers | princed |
| Keywords | karma, karma-plugin, karma-framework, chai, sinon-chai, sinon, dom, jquery, chai-as-promised, chai-things |

## Links

- npm: https://www.npmjs.com/package/karma-chai-plugins
- Repository: https://github.com/princed/karma-chai-plugins
- Issues: https://github.com/princed/karma-chai-plugins/issues
- npm.io page: https://npm.io/package/karma-chai-plugins

## Dependencies (7)

- [chai](https://npm.io/package/chai.md) ^3.4.1
- [sinon](https://npm.io/package/sinon.md) ^2.1.0
- [chai-dom](https://npm.io/package/chai-dom.md) ^1.2.2
- [sinon-chai](https://npm.io/package/sinon-chai.md) ^2.8.0
- [chai-jquery](https://npm.io/package/chai-jquery.md) ^2.0.0
- [chai-things](https://npm.io/package/chai-things.md) ^0.2.0
- [chai-as-promised](https://npm.io/package/chai-as-promised.md) ^5.1.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.9.0 (latest) — 2017-04-12
- 0.8.0 — 2016-09-18
- 0.7.0 — 2016-02-20
- 0.6.1 — 2015-11-13
- 0.6.0 — 2015-06-11
- 0.5.2 — 2015-06-11
- 0.5.1 — 2015-06-10
- 0.5.0 — 2015-04-03
- 0.4.0 — 2015-03-26
- 0.3.0 — 2015-03-25
- 0.2.4 — 2014-12-01
- 0.2.3 — 2014-08-06
- 0.2.2 — 2014-08-05
- 0.2.1 — 2014-03-29
- 0.2.0 — 2014-02-04
- … 8 more at https://npm.io/package/karma-chai-plugins/versions

## README

karma-chai-plugins
==================

> [Chai](http://chaijs.com) browser plugins set for [Karma](http://karma-runner.github.io)

[![Dependency Status](https://img.shields.io/david/princed/karma-chai-plugins.svg?style=flat-square)](https://david-dm.org/princed/karma-chai-plugins) [![Current version](https://img.shields.io/npm/v/karma-chai-plugins.svg?style=flat-square)](https://www.npmjs.com/package/karma-chai-plugins) [![NPM downloads](https://img.shields.io/npm/dt/karma-chai-plugins.svg?style=flat-square)](https://www.npmjs.com/package/karma-chai-plugins) [![Travis Build Status](https://img.shields.io/travis/princed/karma-chai-plugins.svg?style=flat-square)](https://travis-ci.org/princed/karma-chai-plugins) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/princed/karma-chai-plugins.svg?style=flat-square)](https://ci.appveyor.com/project/princed/karma-chai-plugins)

Installation
------------

Install the `karma-chai-plugins`:

```sh
$ npm install karma-chai-plugins --save-dev
```

Add `chai` and plugins you need to the `frameworks` key in your Karma configuration:

```coffee
module.exports = (config) ->
  config.set

    # frameworks to use
    frameworks: ['mocha', 'chai', 'chai-as-promised']

    # ...
```

Bundled plugins
---------------

* [chai](http://chaijs.com)
* [chai-as-promised](http://chaijs.com/plugins/chai-as-promised)
* [chai-dom](http://chaijs.com/plugins/chai-dom) (do not use with chai-jquery)
* [chai-jquery](http://chaijs.com/plugins/chai-jquery) (jQuery should be included manually)
* [sinon-chai](http://chaijs.com/plugins/sinon-chai) (sinon will be included automatically)
* [chai-things](http://chaijs.com/plugins/chai-things)

Note: for using sinon, it is sufficient to add `sinon-chai` in karma frameworks. No need to add `sinon`.

Browser support
---------------

Same as [Chai.js](http://chaijs.com/guide/installation/#browser-section): IE 9+, Chrome 7+, FireFox 4+, Safari 5+ except `should` style that is currently not compatible with IE 9.

Consider [karma-expect](https://github.com/princed/karma-expect), if you need run tests in IE8 and lower.

#### Fair Warning

Currently, in order to use Chai-as-Promised when running tests within PhantomJS, a polyfill for `Function.prototype.bind` must be supplied.  This plugin includes such a polyfill.  If your code under test is intended to be run under PhantomJS *in production*, bear this in mind!  **You may need to supply your *own* polyfill in your project.**  

*The `Function.prototype.bind` polyfill will be removed in the future v1.0 release of karma-chai-plugins.*

chai-dom and chai-jquery can't work together, choose one of them.

Limited require.js support
--------------------------

`karma-chai-plugins` supports `requirejs` in tests, but for now it should be stated in frameworks before `chai` and other plugins:

```coffee
module.exports = (config) ->
  config.set

    # frameworks to use
    frameworks: ['mocha', 'requirejs', 'chai', 'chai-as-promised']

    # ...
```

Contribution guidelines
--------------------------

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using `npm test`.

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