diff --git a/test/fixtures/module/modules/middleware/index.js b/test/fixtures/module/modules/middleware/index.js index 2c5da9afaa..1b55e67475 100755 --- a/test/fixtures/module/modules/middleware/index.js +++ b/test/fixtures/module/modules/middleware/index.js @@ -8,6 +8,8 @@ module.exports = function middlewareModule (options) { res.end('It works!') } }) + // Add local middleware js + this.addServerMiddleware('~/modules/middleware/log.js') // Add plain middleware this.addServerMiddleware((req, res, next) => { next() diff --git a/test/fixtures/module/modules/middleware/log.js b/test/fixtures/module/modules/middleware/log.js new file mode 100755 index 0000000000..c8d2b3ebcb --- /dev/null +++ b/test/fixtures/module/modules/middleware/log.js @@ -0,0 +1,5 @@ +module.exports = function (req, res, next) { + // eslint-disable-next-line no-console + console.log(req.url) + next() +}