javascript - How do I make my stubbed ajax calls live throughout my karma jasmine test cycle? -


i have backbone application instantiating 1 view, whole chain of ajax calls called. if have mainview.js , instantiate new mainview(), mainview instantiates iasmodel.js makes request , returns promise mainview. then, mainview instantiates testcastmodel.js , makes anther ajax call etc... if test mainview.js, have stub these ajax calls (https://github.com/jasmine/jasmine-ajax). test progress, gradually have programmatically create less of these ajax stubs, because application progressing.

how have 1 file lives throughout lifecycle of tests? want able grab ajax request, have 1 file process (route appropriate path) , return stub call.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

node.js - Using Node without global install -

php - CakePHP HttpSockets send array of paramms -