Open zakkudo opened 6 years ago
One other note is the library doesn't seem to set itself up until uirouter-router
is appended to the document body which makes unit testing in isolation a bit more difficult.
Hi, you can start the router manually via start()
, would that solve your issue?
I would love some help with PR's that would improve testing situation.
Night... I am also open to doing pull requests. Thanks for the quick reply!
Awesome, can you share your wrapper work? As far as I can tell UI Router creates a global instance, https://ui-router.github.io/core/docs/latest/ - I skimmed at the docs and found https://ui-router.github.io/core/docs/latest/classes/state.stateregistry.html#deregister - would that work for you to clear out the states?
I'm trying to write some tests for a wrapper I made for
polymer-ui-router
to make it more stateless. Between the tests in karma, it looks like the library is just adding routes instead of overwriting them. (I get an error that thehome
route still exists for example.)Is this known functionality? Should I write a repro?