# karma-jasmine-matchers

> A Karma plugin - Additional matchers for the Jasmine BDD JavaScript testing library.

Latest version **5.0.0** (published 2022-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-jasmine-matchers
pnpm add karma-jasmine-matchers
yarn add karma-jasmine-matchers
bun add karma-jasmine-matchers
```

## 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 | 5.0.0 |
| Published | 2022-02-03 |
| First published | 2014-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Author | Jamie Mason |
| Maintainers | fold_left |
| Keywords | BDD, TDD, jasmine, jasmine, jasmine-matchers, karma-adapter, karma-plugin, testing |

## Links

- npm: https://www.npmjs.com/package/karma-jasmine-matchers
- Repository: https://github.com/JamieMason/karma-jasmine-matchers
- Issues: https://github.com/JamieMason/karma-jasmine-matchers/issues
- npm.io page: https://npm.io/package/karma-jasmine-matchers

## Dependencies (1)

- [jasmine-expect](https://npm.io/package/jasmine-expect.md) 5.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 5.0.0 (latest) — 2022-02-03
- 4.0.2 — 2019-06-20
- 4.0.1 — 2019-01-21
- 3.8.4 — 2018-12-16
- 3.8.3 — 2018-07-15
- 3.7.0 — 2017-03-10
- 3.6.0 — 2017-02-04
- 3.2.0 — 2017-01-14
- 3.0.1 — 2016-08-31
- 2.0.2 — 2016-03-14
- 2.0.1 — 2016-02-04
- 2.0.0 — 2016-02-03
- 2.0.0-beta5 — 2016-02-02
- 2.0.0-beta2 — 2015-09-13
- 2.0.0-beta1 — 2015-02-25
- … 4 more at https://npm.io/package/karma-jasmine-matchers/versions

## README

# karma-jasmine-matchers

> A [Karma](http://karma-runner.github.io/) plugin to inject [Jasmine-Matchers](https://github.com/JamieMason/Jasmine-Matchers) for [Jasmine](http://jasmine.github.io/) and [Jest](http://facebook.github.io/jest/).

[![NPM version](http://img.shields.io/npm/v/karma-jasmine-matchers.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine-matchers) [![NPM downloads](http://img.shields.io/npm/dm/karma-jasmine-matchers.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine-matchers) [![Build Status](http://img.shields.io/travis/JamieMason/karma-jasmine-matchers/master.svg?style=flat-square)](https://travis-ci.org/JamieMason/karma-jasmine-matchers) [![Maintainability](https://api.codeclimate.com/v1/badges/0c6eb0444c813a15058d/maintainability)](https://codeclimate.com/github/JamieMason/karma-jasmine-matchers/maintainability)

## Table of Contents

-   [🌩 Installation](#-installation)
-   [📝 API](#-api)
-   [🕹 Usage](#-usage)
-   [🙋🏾‍♀️ Getting Help](#♀️-getting-help)
-   [👀 Other Projects](#-other-projects)
-   [🤓 Author](#-author)

## 🌩 Installation

    npm install karma-jasmine-matchers --save-dev

## 📝 API

See the following links for a full list of [Matchers](https://github.com/JamieMason/Jasmine-Matchers#matchers) and [Asymmetric Matchers](https://github.com/JamieMason/Jasmine-Matchers#asymmetric-matchers) provided.

## 🕹 Usage

Just include `'jasmine-matchers'` in the `frameworks` and `'karma-jasmine-matchers'`in the plugins section of your config

```js
module.exports = function(config) {
  config.set({
    frameworks: ["jasmine", "jasmine-matchers"],
    files: ["src/**/*.js", "src/**/*.spec.js"],
    // also you must add it as a plugin
    plugins: ["karma-jasmine", "karma-jasmine-matchers"]
  });
};
```

### TypeScript and Angular CLI projects

If you are using TypeScript, you might want to `npm install @types/jasmine-expect --save-dev` in order to prevent your IDE from complaining about the new Matchers.

Also, if you run into TypeScript compilation errors when running your tests, add `"jasmine-expect"` to the `"types"` array in your tests' `tsconfig` file.

As an example, for an Angular CLI based project, this would be your `tsconfig.spec.json` file:

```json
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/spec",
    "baseUrl": "./",
    "module": "commonjs",
    "target": "es5",
    "types": ["jasmine", "node", "jasmine-expect"]
  },
  "files": ["test.ts"],
  "include": ["**/*.spec.ts", "**/*.d.ts"]
}
```

## 🙋🏾‍♀️ Getting Help

Get help with issues by creating a [Bug Report] or discuss ideas by opening a [Feature Request].

[bug report]: https://github.com/JamieMason/karma-jasmine-matchers/issues/new?template=bug_report.md

[feature request]: https://github.com/JamieMason/karma-jasmine-matchers/issues/new?template=feature_request.md

## 👀 Other Projects

If you find my Open Source projects useful, please share them ❤️

-   [**eslint-formatter-git-log**](https://github.com/JamieMason/eslint-formatter-git-log)<br>ESLint Formatter featuring Git Author, Date, and Hash
-   [**eslint-plugin-move-files**](https://github.com/JamieMason/eslint-plugin-move-files)<br>Move and rename files while keeping imports up to date
-   [**eslint-plugin-prefer-arrow-functions**](https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions)<br>Convert functions to arrow functions
-   [**ImageOptim-CLI**](https://github.com/JamieMason/ImageOptim-CLI)<br>Automates ImageOptim, ImageAlpha, and JPEGmini for Mac to make batch optimisation of images part of your automated build process.
-   [**Jasmine-Matchers**](https://github.com/JamieMason/Jasmine-Matchers)<br>Write Beautiful Specs with Custom Matchers
-   [**karma-benchmark**](https://github.com/JamieMason/karma-benchmark)<br>Run Benchmark.js over multiple Browsers, with CI compatible output
-   [**self-help**](https://github.com/JamieMason/self-help#readme)<br>Interactive Q&A Guides for Web and the Command Line
-   [**syncpack**](https://github.com/JamieMason/syncpack#readme)<br>Manage multiple package.json files, such as in Lerna Monorepos and Yarn Workspaces

## 🤓 Author

<img src="https://www.gravatar.com/avatar/acdf106ce071806278438d8c354adec8?s=100" align="left">

I'm [Jamie Mason] from [Leeds] in England, I began Web Design and Development in 1999 and have been Contracting and offering Consultancy as Fold Left Ltd since 2012. Who I've worked with includes [Sky Sports], [Sky Bet], [Sky Poker], The [Premier League], [William Hill], [Shell], [Betfair], and Football Clubs including [Leeds United], [Spurs], [West Ham], [Arsenal], and more.

<div align="center">

[![Follow JamieMason on GitHub][github badge]][github]      [![Follow fold_left on Twitter][twitter badge]][twitter]

</div>

<!-- images -->

[github badge]: https://img.shields.io/github/followers/JamieMason.svg?style=social&label=Follow

[twitter badge]: https://img.shields.io/twitter/follow/fold_left.svg?style=social&label=Follow

<!-- links -->

[arsenal]: https://www.arsenal.com

[betfair]: https://www.betfair.com

[github]: https://github.com/JamieMason

[jamie mason]: https://www.linkedin.com/in/jamiemasonleeds

[leeds united]: https://www.leedsunited.com/

[leeds]: https://www.instagram.com/visitleeds

[premier league]: https://www.premierleague.com

[shell]: https://www.shell.com

[sky bet]: https://www.skybet.com

[sky poker]: https://www.skypoker.com

[sky sports]: https://www.skysports.com

[spurs]: https://www.tottenhamhotspur.com

[twitter]: https://twitter.com/fold_left

[west ham]: https://www.whufc.com

[william hill]: https://www.williamhill.com

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