1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
limesurvey_ynh/sources/third_party/jquery-bindWithDelay/test/test.js

18 lines
No EOL
352 B
JavaScript

module('onDelay');
asyncTest("delay", function() {
var count = 0;
expect(2);
jQuery(document).onDelay("foo", function() { ++count; }, 50);
equal(count, 0, "Not incremented yet");
jQuery(document).trigger("foo").trigger("foo").trigger("foo");
setTimeout(function() {
equal(count, 1, "Three triggers, one count");
start();
}, 100);
});