Jasmine Testing for AngularJS -


Unable to test data provided by promus variables. My code contains a factory function draggraph () in which the json data has been retrieved by $ http service. In the controller, I am using the promise to check successful callback and data retrieval. That's why I can not get the data out of promise Then () function. How can I write Jasmine test cases to check that data values? I wrote a stack overflow question and responded to help with such a thing. / P>

Post some code if it does not help you to start it

This unit is an example test - a small art unit test - which uses $ httpBackend Is

  first (injection (function ($ httpBackend, Products, PATH) {httpBackend = $ httpBackend; httpBackend.when ('JSONP', PATH.url + 'products? Callback = JSON_CALLBACK') Answer (products);}));    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -