Permalink
Browse files

added test for hashchange

  • Loading branch information...
1 parent 22e592e commit 48eb3f6a40205e1cac29bdcfdb39505ba47af58c @peterbraden peterbraden committed Aug 17, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/test.js
View
@@ -307,6 +307,24 @@ asyncTest('Strict test', function() {
}, 100);
});
+
+asyncTest("Hash Change Event test", function() {
+ setTimeout(function() {
+ var hashChangeCount = 0
+ , preventDefaultCount = 0
+ , hashChangeFunc = function(){
+ hashChangedCount ++;
+ equals(hashChangeCount, 1)
+ }
+ $.address.value('/')
+ .change(hashChangeFunc)
+ .hash('foobar')
+ .unbind('hashchange')
+
+ start()
+ }, 100)
+})
+
setTimeout(function() {
$.address.value('/');
}, 30000);

0 comments on commit 48eb3f6

Please sign in to comment.