https://github.com/mantoni/mocha-referee-sinon
Common Mocha setup for @sinonjs/referee-sinon
https://github.com/mantoni/mocha-referee-sinon
mocha referee sinon testing
Last synced: 5 months ago
JSON representation
Common Mocha setup for @sinonjs/referee-sinon
- Host: GitHub
- URL: https://github.com/mantoni/mocha-referee-sinon
- Owner: mantoni
- License: mit
- Created: 2019-02-18T10:28:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-30T11:43:10.000Z (about 3 years ago)
- Last Synced: 2025-03-25T18:12:42.047Z (about 1 year ago)
- Topics: mocha, referee, sinon, testing
- Language: JavaScript
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# mocha-referee-sinon
[![Build Status]](https://travis-ci.org/mantoni/mocha-referee-sinon)
[![SemVer]](http://semver.org)
[![License]](https://github.com/mantoni/mocha-referee-sinon/blob/master/LICENSE)
Common initialization file for [Mocha][] when used with
[@sinonjs/referee-sinon][].
## What it does
Installs global `beforeEach` and `afterEach` hooks for Mocha to verify that
- each test has at least one referee assertion
- the global Sinon sandbox is restored with `sinon.restore()`
## Install
Install in `devDependencies`:
```bash
❯ npm install -D mocha-referee-sinon
```
## Usage
```bash
❯ mocha --file ./node_modules/mocha-referee-sinon
```
## Compatibility
- `1.0.0`: Mocha 5.2, `@sinonjs/referee-sinon` 5.0
## License
MIT
[Build Status]: https://img.shields.io/travis/mantoni/mocha-referee-sinon/master.svg
[SemVer]: https://img.shields.io/:semver-%E2%9C%93-brightgreen.svg
[License]: https://img.shields.io/npm/l/mocha-referee-sinon.svg
[Mocha]: https://mochajs.org
[@sinonjs/referee-sinon]: https://sinonjs.github.io/referee-sinon/