Guest User

Untitled

a guest
Jan 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. describe("hashchange.polling", function() {
  2. it("changing the hash will trigger when the polling loop catches it", function() {
  3. var callback = jasmine.createSpy();
  4.  
  5. jQuery(window).bind( 'hashchange', callback);
  6.  
  7. window.location.hash = 'test';
  8.  
  9. waits(200);
  10.  
  11. runs(function() {
  12. expect(callback).toHaveBeenCalled();
  13. });
  14. });
  15. });
Add Comment
Please, Sign In to add comment