Socket
Socket
Sign inDemoInstall

sinon-with-promise

Package Overview
Dependencies
34
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "sinon-with-promise",
"version": "1.0.1",
"version": "1.0.2",
"description": "Sugar methods for using sinon.js stubs and spies with promises",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -120,3 +120,3 @@ sinon-with-promise

```js
var spy = sinon.spy().resolves('foo');
var spy1 = sinon.spy().resolves('foo');

@@ -131,3 +131,3 @@ function test(spy) {

test(spy)
test(spy1.promised)
.then(function(value) {

@@ -153,3 +153,3 @@ // value === 'foo'

// Example with string
var spy = sinon.spy().rejects('foo');
var spy1 = sinon.spy().rejects('foo');

@@ -164,3 +164,3 @@ function test(spy) {

test(spy)
test(spy1.promised)
.then(function(value) {

@@ -182,3 +182,3 @@ // value === 'baz'

test(spy2)
test(spy2.promised)
.then(function(value) {

@@ -185,0 +185,0 @@ // value === 'xab'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc