{:uriI"Çfile:///Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/active_emit_spec.js?type=application/javascript&pipeline=self&id=d217aab27731399f7c4477cbf718a0a02e29fdef7ef3baf7392859807a28871c:ET:load_pathI"8/Users/izik/www/sparse/izi_lightup/spec/javascripts;T: filenameI"W/Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/active_emit_spec.js;T: nameI" crit-utils/active_emit_spec;T:logical_pathI"(crit-utils/active_emit_spec.self.js;T:content_typeI"application/javascript;T: sourceI"describe("activeOn", function () { var $clock; beforeEach(function () { $clock = jasmine.clock(); }); it("should exists as global function", function () { expect(activeOn).toBeDefined(); expect(typeof activeOn).toBe("function"); }); it("should call callback", function () { return new Promise(function (resolve, _reject) { var emitted = false; activeOn.$$mock(function () { emitted = true; $("body").trigger("click"); }); activeOn(function () { expect(emitted).toBeTruthy(); resolve(); }); }); }); it("should call on timeout", function () { window.__activeTimeout = 1; return new Promise(function (resolve, reject) { var emitter = setTimeout(function () { reject("Should not have been called"); }, 100); window.__activeTimeout = 1; activeOn.$$mock(); activeOn(function () { expect("activeReady").toBeTruthy(); clearTimeout(emitter); resolve(); }); }); }); }); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"efile-digest:///Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/active_emit_spec.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%*åŠ=˙ήyÌ‚"e¡Cž…ã}=7z2‡É: lengthi:dependencies_digest"%!_w šŒ\^}gÝoÍ`FÙN ?ë˜d-A!¤Ã¶:idI"Ed217aab27731399f7c4477cbf718a0a02e29fdef7ef3baf7392859807a28871c;F: mtimel+SH]b