<commit_before>var expect = require('chai').expect;
var RSVP = require('rsvp');
var request = RSVP.denodeify(require('request'));
var AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;

describe('Acceptance | Application', function() {
  this.timeout(300000);

  var app;

  before(function() {
    app = new AddonTestApp();

    return app.create('dummy', {
      fixturesPath: 'tests'
    }).then(function() {
      app.editPackageJSON(function(pkg) {
        pkg.devDependencies['ember-cli-fastboot'] = process.env.npm_package_devDependencies_ember_cli_fastboot;
        pkg.devDependencies['fastboot'] = '1.0.0-rc.1';
      });
      return app.run('npm', 'install');
    });
  });

  after(function() {
    return app.stopServer();
  });

  it('is enabled in development environment', function() {
    return app.startServer({
      command: 'fastboot',
      additionalArguments: ['--serve-assets']
    }).then(function() {
      return request('http://localhost:49741');
    }).then(function(response) {
      expect(response.body).to.contain('The app is working!');
    });
  });

  it('is disabled in production environment', function() {
    return app.startServer({
      command: 'fastboot',
      additionalArguments: ['--serve-assets', '-prod'],
      port: '49742'
    }).then(function() {
      return request('http://localhost:49742');
    }).then(function(response) {
      expect(response.body).to.contain('Error: Could not find module `ember-macro-test-helpers/compute`');
    });
  });
});
<commit_msg>stop server after each test<commit_after>var expect = require('chai').expect;
var RSVP = require('rsvp');
var request = RSVP.denodeify(require('request'));
var AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;

describe('Acceptance | Application', function() {
  this.timeout(300000);

  var app;

  before(function() {
    app = new AddonTestApp();

    return app.create('dummy', {
      fixturesPath: 'tests'
    }).then(function() {
      app.editPackageJSON(function(pkg) {
        pkg.devDependencies['ember-cli-fastboot'] = process.env.npm_package_devDependencies_ember_cli_fastboot;
        pkg.devDependencies['fastboot'] = '1.0.0-rc.1';
      });
      return app.run('npm', 'install');
    });
  });

  afterEach(function() {
    return app.stopServer();
  });

  it('is enabled in development environment', function() {
    return app.startServer({
      command: 'fastboot',
      additionalArguments: ['--serve-assets']
    }).then(function() {
      return request('http://localhost:49741');
    }).then(function(response) {
      expect(response.body).to.contain('The app is working!');
    });
  });

  it('is disabled in production environment', function() {
    return app.startServer({
      command: 'fastboot',
      additionalArguments: ['--serve-assets', '-prod']
    }).then(function() {
      return request('http://localhost:49741');
    }).then(function(response) {
      expect(response.body).to.contain('Error: Could not find module `ember-macro-test-helpers/compute`');
    });
  });
});

{'fraction_non_alphanumeric': 0.17553017944535074, 'fraction_numerical': 0.01468189233278956, 'mean_word_length': 3.610526315789474, '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': '206400', 'n_tokens_mistral': 973, 'n_tokens_neox': 917, 'n_words': 168}