Skip to content
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

api-stubs don't work with testem #601

Closed
tomclose opened this issue Apr 17, 2014 · 3 comments
Closed

api-stubs don't work with testem #601

tomclose opened this issue Apr 17, 2014 · 3 comments

Comments

@tomclose
Copy link

I don't know whether this is a bug, a not-yet-supported feature, or whether I'm just doing something wrong...

I am trying to make use of the api-stubs provided in ember-app-kit for testing.

The stubs work correctly when I view the site in the browser, and when I run the tests by visting /tests in the browser.

However, when I run the tests from the command line with testem (by running grunt test:server) the tests fail as the stub data isn't returned.

You can find a simple example demonstrating the problem here: https://github.com/tomclose/minimal_eak_test_stub_problem, created from the most recent version of ember-app-kit. At the very least, this shows that the out-of-the-box eak defaults don't play well together.

@tomclose
Copy link
Author

This answer describes a work-around: http://stackoverflow.com/questions/23080436/api-stubs-failing-when-running-tests-with-testem-in-ember-app-kit/23132532#23132532. The example repository has been updated with the solution.

It is still surprising (to a beginner at least) that this doesn't just work out-of-the-box.

@dcalhoun
Copy link

@tomclose this was incredibly helpful for me. Thank you for sharing the work around. I also (as a beginner) expected the api-stubs to just "work" out-of-the-box for my Testem server.

@fsmanuel
Copy link
Collaborator

@tomclose as you can see there are open issues on that: #509, #374, #365
Unfortunately they didn't made it into master, yet.
As you stated in your SO comment there is discussion about how to test (fake server or use a real server). I'll try to look into the issues i mentioned and see if we can get a solution for EAK out of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants