mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
attach ignore options to test app, w/ matching routes
This commit is contained in:
@@ -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);
|
||||
['foobar', 'buzz', 'fizzer', 'hello'].forEach(uri => {
|
||||
app.get('/'+uri, (req, res) => res.end(uri));
|
||||
});
|
||||
|
||||
app.listen(PORT);
|
||||
|
||||
Reference in New Issue
Block a user