Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Virile testing for http servers or any nodejs application.
JavaScript
tree: f3e8ffcb0c

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
Readme.md
index.js
package.json

Readme.md

✿ Testosterone

Synchronous testing for virile http servers.

How does it work?

The core of this library is a shameless copy from expresso response assert.

Installation

npm install testosterone

Show me the code

Example:

var app = require('./app'),
    testosterone = require('../lib/testosterone')(),
    assert = testosterone.assert;

testosterone
  .get('/', function (res) {
    assert.equal(res.statusCode, 200)
  })

  .get('/hi', function (res) {
    assert.equal(res.statusCode, 500);
    assert.equal(res.body, 'use post instead');
  })

  .post('/hi', {data: {message: 'hola'}}, {
    status: 200,
    body: 'hola'
  });

Then you run it:

$ node example/test.js

✿ Testosterone
✓ ✓ ✓ ✓ ✓
» 3 responses, 5 asserts

OMG! Synchronooous?

We all know that running tests on parallel is faster, but sometimes is a PITA.

Something went wrong with that request. Please try again.