You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test that the an error route is displayed correctly if an error occurs in our application.
Like so:
import{skip}from'qunit';importmoduleForAcceptancefrom'foo-app/tests/helpers/module-for-acceptance';importPretenderfrom'pretender';letserver;moduleForAcceptance('acceptance:error',{beforeEach(){server=newPretender(function(){this.get('/api/foo',()=>{return[500,{},null];});});},afterEach(){server.shutdown();}});skip('error',function(assert){assert.expect(1);visit('/');andThen(()=>{// can't get here...});});
The problem being that because an error has occurred, the suite fails regardless.
(Sorry if this has been submitted to the wrong repo, it's not clear where this belongs).
The text was updated successfully, but these errors were encountered:
@amk221 I think this duplicates #12791 see that issue for workarounds. It may be fine to just us a workaround, not sure if the ember qunit test env will change or add a config for expecting to fail. Or, if perhaps using assert.throws is even possible.
@amk221 did any of the recommendations in #12791 work for you, If so perhaps we can close this one. I have not seen any strong support for changing the testing behavior for the error handing case in acceptance testing. It seems the work around has been sufficient for most.
I'm trying to test that the an error route is displayed correctly if an error occurs in our application.
Like so:
The problem being that because an error has occurred, the suite fails regardless.
(Sorry if this has been submitted to the wrong repo, it's not clear where this belongs).
The text was updated successfully, but these errors were encountered: