This package has been deprecated

Author message:

This package has been moved to jasmine-http-status-code-matcher

jasmine-node-http-status-code-matcher

1.0.2 • Public • Published

Setup

Install via npm:

npm install --save-dev jasmine-node-http-status-code-matcher

import in node:

var customMatchers = require('jasmine-node-http-status-code-matcher');

tell jasmine to use the matchers:

jasmine.addMatchers(customMatchers);

Usage

Expect a status code to be a given status code

// res.statusCode = 204
expect(res.statusCode).toBeStatusCode(404);

would output:

Expected 204 (No Content) to be 404 (Not Found)

Also works with .not like this:

// res.statusCode = 204
expect(res.statusCode).not.toBeStatusCode(404);

would output:

Expected 204 (No Content) not to be 404 (Not Found)

/jasmine-node-http-status-code-matcher/

    Package Sidebar

    Install

    npm i jasmine-node-http-status-code-matcher

    Weekly Downloads

    1

    Version

    1.0.2

    License

    ISC

    Last publish

    Collaborators

    • timperry