Closed toksdotdev closed 5 years ago
We should also test it with import
in test/src/index.js
Ok, I'll work on the changes.
Just adjusted the PR based on the previous reviews (testing with imports included).
Also contained is @joneldiablo PR to allow grouped middlewares on a route path.
const groupedMiddleware1 = (req, res, next) => {
next();
};
const router = mapRoutes(routes, 'test/fixtures/controllers/', [groupedMiddleware1]);
@TNkemdilim right now it is also possible to pass a function as third argument like:
const router = mapRoutes(routes, 'test/fixtures/controllers/', middlewareGeneral);
If we support this, we should also have a test case for this case...
@TNkemdilim any updates for this test case? If we write that last test i am happy to merge this PR. Also thank you for taking the time and contribute to this project, i really appreciate your effort 👍
I'll send in the updates shortly.
Done!!! Fixes #20 🚀🚀🚀
Coverage decreased (-0.6%) to 89.583% when pulling 4aa09bb2ef542d062bf39007db4be3831e2f7707 on TNkemdilim:integrate-middleware into 2a61ffdf608823390e604634fa45802b63ae7360 on aichbauer:master.