<commit_before>require([ "public/assets/javascripts/lib/widgets/travel_insurance" ], function(TravelInsurance) {

  "use strict";

  describe("TravelInsurance", function() {
    define("wnmock", function() {
      return {};
    });

    it("pulls in the world nomad widget", function() {
      var ready = false;

      runs(function() {
        var widget = new TravelInsurance({
          path: "wnmock",
          callback: function() {
            ready = true;
          }
        }).render();
      });

      waitsFor(function() {
        return ready;
      });

      runs(function() {
        expect(ready).toBeTruthy();
      });
    });

    it("should return a promise when rendering", function() {
      var ready = false;

      runs(function() {
        var widget = new TravelInsurance({
          path: "wnmock"
        });
        
        widget.render().then(function() {
          ready = true;
        });
      });

      waitsFor(function() {
        return ready;
      });

      runs(function() {
        expect(ready).toBeTruthy();
      });
    });

  });

});
<commit_msg>Convert widget specs to jasmine 2.x syntax<commit_after>define([ "public/assets/javascripts/lib/widgets/travel_insurance" ], function(TravelInsurance) {

  "use strict";

  describe("TravelInsurance", function() {

    define("wnmock", function() {
      return {};
    });

    describe("pulling in the World Nomad widget", function() {
      var widget;

      beforeEach(function(done) {
        widget = new TravelInsurance({
          path: "wnmock",
          callback: done
        });

        widget.render()
      });

      it("has loaded", function() {
        expect(widget.$el).toBeDefined();
      });
    });

    describe("should return a promise when rendering", function() {
      var widget;

      beforeEach(function(done) {
        widget = new TravelInsurance({
          path: "wnmock"
        });

        widget.render().then(function() {
          done();
        });
      });

      it("has resolved", function() {
        expect(widget.$el).toBeDefined();
      });
    });

  });

});

{'fraction_non_alphanumeric': 0.15275813295615276, 'fraction_numerical': 0.0004714757190004715, 'mean_word_length': 1.9887323943661972, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1884550', 'n_tokens_mistral': 615, 'n_tokens_neox': 584, 'n_words': 121}