HTTP Mocking for ember-testing

(I do not use Ember day-to-day so take anything I say with a grain of salt.)

  1. HTTP mocking is a great feature for any client side tests. I think it would be ideal if this were reusable and agnostic to Ember, i.e. if you set out to make the best HTTP mocking library in the world, which didn’t need to run within ember-testing or QUnit. But I understand that’s probably adding unnecessary constraints that don’t help your users.

  2. The response-emitter version looks very nice, and as you say, is the most flexible. If I had to choose one, it would be that. Beyond that, fake servers are a simplicity and separation-of-concerns win for the 80% case, so if there’s bandwidth to implement those as well, that would be great.

  3. It’s important to make the failure cases almost as easy to test as the success cases, as error handling flow is often under-tested. Thus APIs should be able to send back arbitrary status codes, not just 200, or they should be able to timeout, or perhaps even simulate an XMLHttpRequest abort.