<commit_before>
describe('Building applications based on modules', function() {

  afterEach(function() {
    Space.Module.published = {}; // reset published space modules
  });

  it('loads required module correctly', function() {

    var testValue = {};
    var testResult = null;

    Space.Module.extend(function() {
      this.publish(this, 'FirstModule');
      return {
        configure: function() {
          this.injector.map('testValue').toStaticValue(testValue);
        }
      }
    });

    Space.Application.create({
      RequiredModules: ['FirstModule'],
      Dependencies: { testValue: 'testValue' },
      configure: function () { testResult = this.testValue; }
    });

    expect(testResult).to.equal(testValue);
  });

  it('configures module before running', function() {

    var moduleValue = 'module configuration';
    var appValue = 'application configuration';
    var testResult = null

    Space.Module.extend(function() {

      this.publish(this, 'FirstModule');

      return {
        configure: function() {
          this.injector.map('moduleValue').to(moduleValue);
        },
        startup: function() {
          testResult = this.injector.get('moduleValue');
        }
      };
    });

    var app = Space.Application.create({
      RequiredModules: ['FirstModule'],
      Dependencies: { moduleValue: 'moduleValue' },
      configure: function() {
        this.injector.override('moduleValue').toStaticValue(appValue);
      }
    });

    app.start();
    expect(testResult).to.equal(appValue);
  });
});<commit_msg>adds some missing semicolons<commit_after>
describe('Building applications based on modules', function() {

  afterEach(function() {
    Space.Module.published = {}; // reset published space modules
  });

  it('loads required module correctly', function() {

    var testValue = {};
    var testResult = null;

    Space.Module.extend(function() {
      this.publish(this, 'FirstModule');
      return {
        configure: function() {
          this.injector.map('testValue').toStaticValue(testValue);
        }
      };
    });

    Space.Application.create({
      RequiredModules: ['FirstModule'],
      Dependencies: { testValue: 'testValue' },
      configure: function () { testResult = this.testValue; }
    });

    expect(testResult).to.equal(testValue);
  });

  it('configures module before running', function() {

    var moduleValue = 'module configuration';
    var appValue = 'application configuration';
    var testResult = null;

    Space.Module.extend(function() {

      this.publish(this, 'FirstModule');

      return {
        configure: function() {
          this.injector.map('moduleValue').to(moduleValue);
        },
        startup: function() {
          testResult = this.injector.get('moduleValue');
        }
      };
    });

    var app = Space.Application.create({
      RequiredModules: ['FirstModule'],
      Dependencies: { moduleValue: 'moduleValue' },
      configure: function() {
        this.injector.override('moduleValue').toStaticValue(appValue);
      }
    });

    app.start();
    expect(testResult).to.equal(appValue);
  });
});
{'fraction_non_alphanumeric': 0.1441727532550016, 'fraction_numerical': 0.0, 'mean_word_length': 2.7951807228915664, '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': '2007436', 'n_tokens_mistral': 876, 'n_tokens_neox': 845, 'n_words': 165}