Socket
Book a DemoInstallSign in
Socket

promise-assert

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

promise-assert

Inline promise assertion library

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

promise-assert

NPM version build status Test coverage Downloads js-standard-style

Inline Promise assertion library.

Installation

$ npm install promise-assert

Usage

const pa = require('promise-assert')

Promise.resolve(1337)
  .then(pa.equal(1337))
  // => ok

API

pa()
Promise.resolve(false)
  .then(pa())
  // => AssertionError
pa.ok()

pa.ok() == pa()

pa.equal()
Promise.resolve('hello')
  .then(pa.equal('hello'))
  // => ok

License

MIT

Keywords

promise

FAQs

Package last updated on 14 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts