attendant
A super tiny test server. Best used to test your
frontend packages.
Installation
$ npm i --save attendant
Overview
var attendant = require('attendant');
var request = require('supertest');
var server = attendant({foo: 'bar'});
request(server.listen())
.get('/')
.expect('Content-Type', /json/)
.expect(200, done);
API
attendant()
var attendant = require('attendant');
var request = require('supertest');
var server = attendant({tobi: 'ferret'});
request(server.listen())
.get('/')
.expect('Content-Type', /json/)
.expect(200, done);
request(server.listen())
.put('/')
.send({cat: 'dog'})
.expect(204, done);
License
MIT ©
Yoshua Wuyts