Test that a route has been correctly rewritten with Jasmin

18 views
Skip to first unread message

Augier L

unread,
Feb 8, 2015, 9:10:25 AM2/8/15
to jasmi...@googlegroups.com

I'm using backbone for a project in which I manually rewrite the URL in the browser using app.router.navigate().

I want to be able to test this behaviour with jasmine. I've used expect(Backbone.history.fragment.endsWith()).toBeTruthy(); and expect(document.URL.endsWith()).toBeTruthy(); to test this.

When I run Jasmine test on my own browser, everything is ok but when these tests automatically run on Travis CI, they fail saying document.URL or Backbone.history.fragment is undefined. Why does it do that ?

Reply all
Reply to author
Forward
0 new messages