New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sinon-stub-promise

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon-stub-promise - npm Package Compare versions

Comparing version 0.0.9 to 0.1.0

3

index.js

@@ -5,3 +5,3 @@ function buildThenable() {

try {
if (this.resolved) {
if (this.resolved && !this.rejected) {
var returned = onFulfill(this.resolveValue);

@@ -86,2 +86,1 @@

}
{
"name": "sinon-stub-promise",
"version": "0.0.9",
"version": "0.1.0",
"description": "Synchronous Promise stubbing for Sinon.JS",

@@ -5,0 +5,0 @@ "author": "Alex May <alex@substantial.com>",

@@ -87,1 +87,5 @@ # sinon-stub-promise

that will grow over time as we identify any short comings of this library.
## To Do
* Allow for chaining with `withArgs`. Ideally we could do things like `sinon.stub().withArgs(42).resolves('value')`.

@@ -267,3 +267,21 @@ var sinon = require('sinon');

});
it('does not execute additional then blocks when an error is thrown', function(done) {
promise.resolves();
var callCount = 0;
promise()
.then(function() {
throw new Error('Stop the insanity');
})
.then(function() {
callCount++;
})
.catch(function(error) {
expect(callCount).to.eql(0);
expect(error.message).to.eql('Stop the insanity');
done();
});
});
});
});
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc