# sinon-es6

> JavaScript test spies, stubs and mocks for ES6.

Latest version **0.0.3** (published 2014-08-04) · 0 weekly downloads

## Install

```sh
npm install sinon-es6
pnpm add sinon-es6
yarn add sinon-es6
bun add sinon-es6
```

## 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.0.3 |
| Published | 2014-08-04 |
| First published | 2014-08-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.11 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gonzalo Aguirre |
| Maintainers | ingame |
| Keywords | sinon, es6, harmony, generators, ecma 6, ecmascript 6 |

## Links

- npm: https://www.npmjs.com/package/sinon-es6
- Repository: http://github.com/ingameio/SinonES6.JS
- Homepage: http://cjohansen.no/sinon/
- Issues: http://github.com/ingameio/SinonES6.JS/issues
- npm.io page: https://npm.io/package/sinon-es6

## Dependencies (2)

- [util](https://npm.io/package/util.md) >=0.10.3 <1
- [formatio](https://npm.io/package/formatio.md) ~1.0

## Recent versions

- 0.0.3 (latest) — 2014-08-04
- 0.0.2 — 2014-08-02
- 0.0.1 — 2014-08-02

## README

# SinonES6.JS
Sinon.js version compatible with ES6.
Everything is like the original version of [sinon](http://github.com/cjohansen/Sinon.JS), plus generators mocking.
``` js
var sinon = require('sinon-es6');

var objectToMock = {
    generator: function* (a, b) { yield ... }
};

sinon.mock(objectToMock).expects('generator').withArgs(2,3).returns(6);
```

All credits to @cjohansen and [Sinon.JS](http://github.com/cjohansen/Sinon.JS) contributors.

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