onBeforeRoute can be canceled
fix and add new unit tests
Merge pull request #12 from serheyShmyg/beforeRoute

onBeforeRoute can be canceled