assertive-as-promised
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
## 1.0.0 | ||
## 1.0.1 | ||
@@ -3,0 +3,0 @@ * Switch to bluebird |
{ | ||
"name": "assertive-as-promised", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Extends assertive with promise support", | ||
@@ -5,0 +5,0 @@ "main": "lib/aap.js", |
# Assertive for Promises | ||
**Assertive as Promised** extends [Assertive][assertive] for asserting things | ||
about promises; specifically Q-compliant promises at the moment. It is 100% | ||
backward-compatible, so all of the existing assertive documentation applies. | ||
about standards-compliant promises. It is 100% backward-compatible, so all of | ||
the existing assertive documentation applies. | ||
@@ -19,4 +19,5 @@ ## How to Use | ||
get nicer and more consistent errors if you put any function calls that may | ||
have a risk of throwing an exception synchronously inside a `Q.try()`, thusly: | ||
`assert.equal('foo', Q.try -> funcThatReturnsAPromiseForAString())` | ||
have a risk of throwing an exception synchronously inside a bluebird | ||
`Promise.try()`, thusly: | ||
`assert.equal('foo', Promise.try -> funcThatReturnsAPromiseForAString())` | ||
@@ -39,4 +40,4 @@ Note for `throws()` and `notThrows()` that they accept a function (which may | ||
{ runSync, runAsync } = require './some-library' | ||
assert = require 'assertive-as-promised' | ||
Q = require 'q' | ||
assert = require 'assertive-as-promised' | ||
Promise = require 'bluebird' | ||
# runAsync returns a promise | ||
@@ -56,3 +57,3 @@ | ||
fn = -> Q.try -> throw 'kaboom' | ||
fn = -> Promise.try -> throw 'kaboom' | ||
it 'fails asynchronously with the proper error', -> | ||
@@ -69,6 +70,6 @@ assert.equal 'kaboom', assert.rejects fn | ||
assert = require 'assertive-as-promised' | ||
Q = require 'q' | ||
Promise = require 'bluebird' | ||
it 'runs and fails asynchronously', -> | ||
Q.all [ | ||
Promise.all [ | ||
assert.deepEqual 'got proper hash', { a: 42 }, runAsync('good') | ||
@@ -75,0 +76,0 @@ assert.rejects 'fails on bad', -> runAsync('bad') |
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
41379
86