Sha256: 542f612d9bffcf952b73d408679a0d14ea88adcf09b759be45a238cf37c7cf9d

Contents?: true

Size: 1.95 KB

Versions: 8

Compression:

Stored size: 1.95 KB

Contents

{:uriI"file:///Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/wait_for_spec.js?type=application/javascript&pipeline=self&id=aca2c6ec68e7594a66d359138d44932641e3955f707ac760589d675db4e84947:ET:load_pathI"8/Users/izik/www/sparse/izi_lightup/spec/javascripts;T:
filenameI"T/Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/wait_for_spec.js;T:	nameI"crit-utils/wait_for_spec;T:logical_pathI"%crit-utils/wait_for_spec.self.js;T:content_typeI"application/javascript;T:sourceI"{describe("waitFor", function () {
  it("should exists as global function", function () {
    expect(waitFor).toBeDefined();
    expect(typeof waitFor).toBe("function");
  });

  it("should return curried fn to pass callback", function () {
    expect(typeof waitFor("SOMEWHAT")).toBe("function");
  });

  it("should call callback", function () {
    return new Promise(function(resolve) {
      waitFor("jQuery")(function() {
        expect(jQuery).toBeDefined();
        resolve();
      });
    });
  });

  it("should wait for required global variable", function () {
    return new Promise(function(resolve) {
      var KEY = "some-awesome-key";
      expect(window[KEY]).toBeUndefined();
      setTimeout(function () {
        window[KEY] = "TODO";
      }, 1);
      waitFor(KEY)(function () {
        expect(window[KEY]).toBeDefined();
        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"bfile-digest:///Users/izik/www/sparse/izi_lightup/spec/javascripts/crit-utils/wait_for_spec.js;TTF:
requiredo;;}F:stubbedo;;}F:
linkso;;}F:charsetI"
utf-8;F:digest"%!׬;~HabHolǘ:lN:lengthi{:dependencies_digest"%@xT2ޔE|63C:idI"Eaca2c6ec68e7594a66d359138d44932641e3955f707ac760589d675db4e84947;F:
mtimel+a/]b

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
izi_lightup-1.0.31 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.29 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.28 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.27 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.26 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.25 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.24 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache
izi_lightup-1.0.23 spec/dummy/tmp/cache/assets/sprockets/v3.0/Zu/zuSOi_ZWRnpWpmeu2DwnV9MEq2aPsn5W7kBYYMi6y2g.cache