Hello
To create db seeds for testing, the documentation is straight forward. Add your seeds to mirage/scenarios/default.js
But in my case, the file wont be loaded. I added a console output additionally to ensure if it will be loaded. But this is not the case. Filename and filepath are correct. Is there anything else I need to do?
Documentation:
https://www.ember-cli-mirage.com/docs/getting-started/overview
Hi @herrnesto, scenarios aren’t used in testing by default. The default scenario is intended for use in development/prototyping. That said you can use scenarios in tests if you’d like following the guides page (it’s the bottom section on the page if the anchor link doesn’t work).
A scenario is really just a function that receives the server and creates some things with it so it’s not hard to wire up and you can place them wherever you’d like.
2 Likes
Hey @dknutsen , Thank you for this clarification. It makes sense now!
1 Like