Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb/pull/227#issuecomment-44568816
  
    Here are my problems I had with the RouteObject and testing:
    
    The event delegation and EventBus is coupled to the RouteObject. Instead 
testing of a ViewComponent and a View which are talking to each other I have to 
initialize the RouteObject (and probably stub away methods), so the Components 
are not testable as standalone views any more but are coupled to another 
dependency, the RouteObject.
    
    Additionally the FauxtonAPI-Eventbus (`triggerRouteEvent `) is not 
initialized when just requiring it, there is some magic missing. Therefore I 
had to stub it away in the tests:
    
https://github.com/robertkowalski/couchdb/commit/248a6ec275d832f574c45377083a52ef534171f5#diff-e635c8b6bc197fb062c62a381b2b92e1R26



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to