Socket
Book a DemoInstallSign in
Socket

sinon-es6

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon-es6

JavaScript test spies, stubs and mocks for ES6.

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
1K
-10.14%
Maintainers
1
Weekly downloads
 
Created
Source

SinonES6.JS

Sinon.js version compatible with ES6. Everything is like the original version of sinon, plus generators mocking.

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 contributors.

Keywords

sinon

FAQs

Package last updated on 04 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts