sinon-as-promised
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "sinon-as-promised", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"homepage": "https://github.com/bendrucker/sinon-as-promised", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "sinon-as-promised", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Sugar methods for using sinon.js stubs with promises", | ||
@@ -5,0 +5,0 @@ "main": "./src", |
@@ -6,4 +6,11 @@ 'use strict'; | ||
function ensure (actual, expected) { | ||
expected.forEach(function (method) { | ||
if (actual.indexOf(method) === -1) actual.push(method); | ||
}); | ||
return actual; | ||
} | ||
function thenable (promiseFactory) { | ||
return Object.getOwnPropertyNames(Promise.prototype) | ||
return ensure(Object.getOwnPropertyNames(Promise.prototype), ['catch', 'finally']) | ||
.filter(function (method) { | ||
@@ -10,0 +17,0 @@ return method !== 'then'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7242
5
92