From 3d77dacbd6791e0b410570bb1ef85009acb1ce5a Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Sun, 29 Jul 2018 14:02:18 -0700 Subject: [PATCH] attach `ignore` options to test app, w/ matching routes --- test/app/app/server.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/app/app/server.js b/test/app/app/server.js index 645699f..b02d82e 100644 --- a/test/app/app/server.js +++ b/test/app/app/server.js @@ -91,8 +91,14 @@ const middlewares = [ return new Store({ title: 'Stored title' }); - } - }) + }, + ignore: [ + /foo/i, + '/buzz', + 'fizz', + x => x === '/hello' + ] + }), ]; if (BASEPATH) { @@ -101,4 +107,8 @@ if (BASEPATH) { app.use(...middlewares); } -app.listen(PORT); \ No newline at end of file +['foobar', 'buzz', 'fizzer', 'hello'].forEach(uri => { + app.get('/'+uri, (req, res) => res.end(uri)); +}); + +app.listen(PORT);