# strict-spies

> A strict alternative for Jasmine spies

Latest version **2.0.2** (published 2017-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install strict-spies
pnpm add strict-spies
yarn add strict-spies
bun add strict-spies
```

## 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 | 2.0.2 |
| Published | 2017-12-19 |
| First published | 2017-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Rene Saarsoo |
| Maintainers | nene, zeroturnaround |
| Keywords | unit-testing, jasmine, spy |

## Links

- npm: https://www.npmjs.com/package/strict-spies
- Repository: https://github.com/zeroturnaround/strict-spies
- npm.io page: https://npm.io/package/strict-spies

## 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
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2017-12-19
- 2.0.1 — 2017-12-19
- 2.0.0 — 2017-12-19
- 1.0.1 — 2017-02-06
- 1.0.0 — 2017-02-06

## README

# Strict spies

A strict alternative for [Jasmine spies][]. Also works for [Chai][].

## Install

    yarn add --dev strict-spies

## Usage with Jasmine

Include in your Jasmine setup file that's run before all tests:

```js
import StrictSpies from "strict-spies/jasmine";

beforeEach(function() {
    // Initialize spies container for each test run.
    this.spies = new StrictSpies();

    // Register Spies-specific assertions to be used instead of Jasmine built-in spy-assertions
    jasmine.addMatchers(StrictSpies.assertions);
});
```

## Usage with Chai

Add to your Mocha setup file:

```js
import chai from "chai";
import StrictSpies from "strict-spies/chai";

// Register Spies-specific assertions
chai.use(StrictSpies.assertions);

beforeEach(function() {
    // Initialize spies container for each test run.
    this.spies = new StrictSpies();
});
```


[Jasmine spies]: https://jasmine.github.io/2.5/introduction#section-Spies
[Chai]: http://chaijs.com/

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