{:uriI"Çfile:///Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/active_emit_spec.js?type=application/javascript&pipeline=self&id=9aed92b7fb7c367d37b0ed68a0c2fad5f00b15656af16fe02c7e8181087d0c9e: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 () { 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"%ùê ÇT‹šk£1A°¾¶´#C)ÁêîÌDY$: lengthiÅ:dependencies_digest"%êuHÔì$»;Ë»‰jv¬Ù/‚QÆŒÙþSØ#®åy:idI"E9aed92b7fb7c367d37b0ed68a0c2fad5f00b15656af16fe02c7e8181087d0c9e;F: mtimel+I]b