Skip to content

Can there be a more helpful error for non-existing routes #742

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

Closed
homanchou opened this issue Jan 6, 2014 · 7 comments
Closed

Can there be a more helpful error for non-existing routes #742

homanchou opened this issue Jan 6, 2014 · 7 comments

Comments

@homanchou
Copy link

I don't know if this is the right venue, but here is my user story:

As a developer, when I use an incorrect route in my $urlRouterProvider.otherwise config, I would prefer to see an error like 'no matching route for $urlRouterProvider.otherwise' instead of 'Some of your tests did a full page reload!', so that I know where the error is coming from, so that I do not pull my hair out.

http://stackoverflow.com/questions/20960332/ui-router-causing-full-page-reload-in-controller-test

@timkindberg
Copy link
Contributor

Haha, we can mark it as a bug and see what happens.

@homanchou
Copy link
Author

I may have jumped to the wrong conclusion. A co-worker wrote some new tests and the error Some of your tests did a full page reload! came back despite using a correct value for $urlRouterProvider.otherwise(...). I have updated the stackoverflow http://stackoverflow.com/questions/20960332/ui-router-causing-full-page-reload-in-controller-test conversation. I'm not sure what my problem is now since the error I'm getting is unexpected GET request for the state's template file.

@timkindberg
Copy link
Contributor

At this point you'd need to put together a plunkr and try to isolate the bug. Then we can take a look at it.

@homanchou
Copy link
Author

@homanchou
Copy link
Author

Looks like it's a known issue?

#212

I have implemented the state mock method mentioned in that issue. It appears to works for now, it bypasses kicking in the actual routing, which would be more of an integration test instead of the desired unit test that I want.

@timkindberg
Copy link
Contributor

Is this a dupe then?

@homanchou
Copy link
Author

yes

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

No branches or pull requests

2 participants