Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 464 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 464 Bytes

To update snapshot jest --updateSnapshot

To run manually ./node_modules/@tradeshift/v4/bin/v4.js test

To mock api

import * as unexpectedWrapper from 'unexpected';
import * as unexpectedExpress from 'unexpected-express';
import routes from './routes';

const mock = unexpectedWrapper.clone().installPlugin(unexpectedExpress);

return mock(routes, 'to yield exchange', {
    request: '/url',
    response: {
        statusCode: 200
    }
});