ember.js - api-stubs failing when running tests with testem in ember-app-kit -
i trying make use of api-stubs provided in ember-app-kit testing.
the stubs work correctly when view site in browser, , when run tests visting /tests in browser.
however, when run tests command line testem (by running grunt test:server) tests fail stub data isn't returned.
you can find minimal example demonstrating problem here: https://github.com/tomclose/minimal_eak_test_stub_problem, created recent version of ember-app-kit.
what doing wrong?
because testem stuff runs on port (7239 it?) a) can't run apistub server ont same port (already bound).
thus, have run normal app (port 8000), let testem run on own port.. , allow testem via 'host' param in adapter go find right host:port combination data.
as well, addition of cors() filter make :8000 test server willing send data "cross domain request" on port 7239
the use of sinon different case (don't want use apistub @ all). settled on not trying use apistub testing, above approach works great.
Comments
Post a Comment