Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: TypeError: 'undefined' is not an object (evaluating 'response.config.ignoreLoadingBar') #203

Closed
wethinkagile opened this issue May 26, 2015 · 1 comment
Labels

Comments

@wethinkagile
Copy link

When Unit Testing my App I am seeing:

Testing: TypeError: 'undefined' is not an object (evaluating 'response.config.ignoreLoadingBar')

Apparently I did not mock out the LoadingBar HTTP Interceptor. How to achieve this or surpress this error message while running tests (with karma and jasmine in my case). I tried injecting cfpLoadingBarProvider into my beforeEach hook but it fails because it is not a injectible module .

@chieffancypants
Copy link
Owner

There shouldn't really be any difference in your unit tests, meaning it should just work. My guess is you have an interceptor that is not working properly, or perhaps you've mocked out an interceptor and you're not returning a config object. See #50 for more information on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants