-
Notifications
You must be signed in to change notification settings - Fork 192
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
When route not found during testing, don't log error #615
base: master
Are you sure you want to change the base?
Conversation
This fix would be amazing! 👍 When using practicalmeteor:mocha-console-runner a long with spacejam the following error is thrown. I currently have this file loaded at the beginning of all my
This hackish solution works, but a fix in the code like suggested would do wonders. @arunoda How do you handle this issue currently? |
👍 It's really annoying that message |
console.error("There is no route for the path:", context.path); | ||
if(!Meteor.isTest && !Meteor.isPackageTest) { | ||
console.error("There is no route for the path:", context.path); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a else branchement with a log ?
} else {
console.log("There is no route for the path:", context.path);
if (window.console && window.console.trace) {
console.trace();
}
}
Otherwise 👍
This pull request is working so great ! When you are running an app in the test mode, the library doesn't have any route and it just crashes. The test
https://github.com/serut/todos use that fix and it works great. It's related to A LOT of issues, so please do something to fix it: |
+1 please merge |
This is just hiding an annoying message ( Ok, I'm not sure about console runners maybe there it is a problem like the message being printed to stderr and confusing the runner. But the web driver has other problems too. When running What seems to work is
|
Could this be merged soon? 👍 |
Would you mind submitting this PR to FineRouter too? |
Based on the PR that is still not merged into flowrouter kadirahq/flow-router#615
Found this while still struggling. Here's a work-around: Create a file that is loaded by the test-suite (by e.g. calling it import { FlowRouter } from 'meteor/kadira:flow-router';
// Needed to initialize the routing when testing.
FlowRouter.notFound = {
action() {
},
}; |
meteor/todos
is currently throwing this error on the client duringmeteor test
.meteor/todos#130 (comment)