miragejs / discuss

Ask questions, get help, and share what you've built with Mirage
MIT License
2 stars 0 forks source link

Ember Data model helper for integration tests #31

Open samselikoff opened 5 years ago

samselikoff commented 5 years ago

image


4 upvotes from Canny

ro0gr commented 5 years ago

just have seen it recently https://github.com/caseywatts/ember-proper-instantiation

samselikoff commented 5 years ago

@ro0gr yes exactly! Want to make something like this a first-class API in Mirage 👍

flexyford commented 5 years ago

Wanted to share a clickable link to @samselikoff gist: https://gist.github.com/samselikoff/b00b5a190321c8236ee0e0fab200bf65

Inspired by that work and the work of ember-proper-instantiation, we've extended the mirage server with server.createRecord and server.createRecords to return EmberData Models.

I threw together a quick gist to show others what we've been working on. It's worked well for us so far. https://gist.github.com/flexyford/44ff73ec644ab9b80f1010ac4e30f674

Would love to bake this into mirage, let me know if these are steps in the right direction and if I can help in any way.

samselikoff commented 5 years ago

@flexyford awesome man 👌 , this is definitely one of the highest-priority items in Mirage. I'm focused on landing a 1.0 first (few more bugs but we're really close!)

samselikoff commented 4 years ago

FYI: Transferred this to our Discuss repo, our new home for more open-ended conversations about Mirage!

If things become more concrete + actionable we can create a tracking issue in the main repo.