Weird behaviour when using pretender and running `ember test`



I have a weird issue with pretender. My tests are succeeding when running ember serve and visiting ‘/tests’ but they are failing when running ember test.

I checked if the request is being handled by pretender when running ember test but it seems like pretender is not handling the request when running ember test.

Is this a known issue?

Kind regards, Manuel


Hey again!

Just wanted to report how I fixed the issue.

So what I didn’t know about pretender was: it expects request be in just-path form.

Setting the ENV.apiHost to "" when the environment is 'development' did the trick for me.

Kind regards, Manuel


The Pretender#unhandledRequest() hook works wonders for debugging these kind of errors!