Socket
Book a DemoInstallSign in
Socket

asserto

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asserto

Asserto - expresso style assertions in a module

0.2.0
latest
Source
npmnpm
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

Asserto

Improved assert, supporting the feature set of Expresso's assert used to easily migrate away Expresso to another testing framework. nothing special, just module.exports TJ's code from expresso as a small module

Features

  • assert.eql() alias of assert.deepEqual()
  • assert.includes()
  • assert.type()
  • assert.isNull()
  • assert.isUndefined()
  • assert.isNotNull()
  • assert.isDefined()
  • assert.match()
  • assert.length()
  • assert.response() with slightly different callback style: was function(res), now: function(err, res){}

Response

assert.response now looks like this:

assert.response({ url : '/someLocalEndpoint', method : 'POST', headers : { 'Content-Type' : 'application/json' } }, { status : 200 }, function(err, res) { assert.ok(!err); assert.equal(res.headers['content-type'], 'application/json'); });

FAQs

Package last updated on 31 Jul 2013

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.