Combined bypass and bypassOnFinish into one option

This commit is contained in:
Henrik Karlsson
2022-12-14 17:00:11 +01:00
parent ea9f34aa3e
commit 1171fb5be1
4 changed files with 32 additions and 7 deletions

View File

@@ -243,7 +243,9 @@ describe('index', () => {
it('bypass requests, checking res', done => {
const app = express();
const instance = bundle({
bypassOnFinish: (req, res) => res.statusCode === 404,
bypass: {
onFinish: (req, res) => res.statusCode === 404
}
});
app.use(instance);
app.use('/200', (req, res) => res.send(''));