/pickleback

shot, except patched to work with express

Primary LanguageJavaScriptOtherNOASSERTION

shot pickleback

This is a patched version of shot that implements an admittedly pretty gross fix so that it works with express because the shot team won't.

Unlike the case with shot, this works:

const assert = require('assert');

const express = require('express');
const pickleback = require('pickleback');

const app = express();

app.get('/', (req, res) => {

    res.end('hello world!');
});

const main = async () => {

    const res = await pickleback.inject(app, { url: '/' });
    assert.equal(res.payload, 'hello world!');
}

main();

API

APIs are almost identical to shot's, so shot's docs should be correct.