-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ember-cli] Replace http-mocks feature from with Mirage #527
Comments
I've seen a couple questions on SO recently about server mocks (eg: https://stackoverflow.com/questions/57333908/ember-js-how-can-i-test-express-server-mock). I think this was a great feature a few years ago that probably needs to go away (or at least recommend users to go another way for almost everything it used to support). |
I kinda hoped mirage would integrate with I love the mirage workflow, but it's really unacceptable to take 5 seconds to see my change. |
Opened #576 for this. |
I recently discovered that ember-cli has the ability to setup server mocks using
ember g http-mock posts
. It installs thehttp-mock
library and sets up aserver/
folder with some boilerplate.This feature is documented on the old ember-cli website: https://ember-cli.com/user-guide/#mocks, but not in the new guides as far as I can see: https://cli.emberjs.com/release/.
I personally use
ember-cli-mirage
in every project, and although it can feel bit larger in terms of surface area, I think the request handling bit of it can be given first class support in Ember CLI core. The database part (schema/db/factories/models) of Mirage is a more advanced feature (which I love), but could come from userland (similar to something like faker.js).Considering that Mirage is moving to a framework-agnostic setup, I think this is a good time to revisit how Ember CLI can integrate it (probably by including it in package.json, rather than exposing it as an opaque generator command.)
The text was updated successfully, but these errors were encountered: