expressjs / expressjs/discussions
More Support For BYOF Styles
- Dominant language
- No language data
- Stars
- 73
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
One of the strong parts of Express is it's extensibility. Especially with `5.0` where we pull the router and other modules out from core, it seems like the general direction is to support a "build your own framework" style of using Express modules.
There are many advantages to this approach I assume everyone here will already be familiar with, so I won't go into them. But, one of the biggest hurdles with maintaining a large ecosystem of interrelated modules is maintaining compatibility.
To this end, I thought we could provide some compatibility test suites for authors who want to stray from the core, but still want to say "express support" or "express compatible" or even just "works GREAT with express". The idea for this came to me from https://github.com/maxogden/abstract-blob-store, where you can advertise compatibility, and then other modules can build upon the common verified test suite.
So I started a WIP on testing the "core" or "required" parts of the interface for an express compatible router. The goal is not to replicate the Router test suite, but to provide the abstract parts which Express actually requires by way of binding. I actually think I may have went too far in this first try, but that can be a discussion point.
Anyway, here is the initial work:
https://github.com/wesleytodd/abstract-router-harness
https://www.npmjs.com/package/abstract-router-harness
And here is an example of using it:
https://github.com/wesleytodd/micro-router/blob/master/test/index.js#L12-L15
I would love feedback if anyone has it.
Contributor guide
Assessment
This issue has not been assessed yet.