restify-test-fixture

1.0.4 • Public • Published

restify-test-fixture

A simple startup and teardown for tests using restify servers

Best used with with-fixtures

Use

const restifyFixture = require('restify-test-fixture');
const withFixtures = require('with-fixtures');

doSomeTest(async () => {
    const fixture = restifyFixture(server => {
        server.post('/path', handler);
    })
    await withFixtures([
        fixture
    ], () => {
        const url = (await fixture).url
        // make request to url here
    });
})

Readme

Keywords

none

Package Sidebar

Install

npm i restify-test-fixture

Weekly Downloads

0

Version

1.0.4

License

ISC

Last publish

Collaborators

  • aredridel