asserto

0.2.0 • Public • Published

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'); });

Dependents (0)

Package Sidebar

Install

npm i asserto

Weekly Downloads

2

Version

0.2.0

License

none

Last publish

Collaborators

  • cianclarke