Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assertive-as-promised

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assertive-as-promised - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

CHANGELOG.md

@@ -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')

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