<commit_before>var fs = require('fs-extra');
var pathExtra = require('path-extra');
var assert = require('assert');
var requestJSON = require('request-json-light');
require('should');

var cozyLight = require('../lib/cozy-light');
var configHelpers = cozyLight.configHelpers;
var applicationHelpers = cozyLight.applicationHelpers;

var workingDir = pathExtra.join( __dirname, '.test-working_dir');
var fixturesDir = pathExtra.join( __dirname, 'fixtures');
fs.removeSync(workingDir);
fs.mkdirSync(workingDir);

before(function(){
  cozyLight.init({home: workingDir});
});

after(function(){
  try {
    fs.removeSync(workingDir);
  } catch(err) {
    console.log(err);
  }
});

describe('Application Helpers', function () {

  describe('start', function () {
    it('should start a server for given application', function (done) {
      this.timeout(10000);
      var source = pathExtra.join(fixturesDir, 'test-app');
      var dest = configHelpers.modulePath('test-app');<commit_msg>fixed stop sequence<commit_after>var fs = require('fs-extra');
var pathExtra = require('path-extra');
var assert = require('assert');
var requestJSON = require('request-json-light');
require('should');

var cozyLight = require('../lib/cozy-light');
var configHelpers = cozyLight.configHelpers;
var applicationHelpers = cozyLight.applicationHelpers;

var workingDir = pathExtra.join( __dirname, '.test-working_dir');
var fixturesDir = pathExtra.join( __dirname, 'fixtures');
fs.removeSync(workingDir);
fs.mkdirSync(workingDir);

before(function(){
  cozyLight.init({home: workingDir});
});

after(function(done){
  cozyLight.stop(function(){
    try {
      fs.removeSync(workingDir);
    } catch(err) {
      console.log(err);
    }
    done();
  });
});

describe('Application Helpers', function () {

  describe('start', function () {
    it('should start a server for given application', function (done) {
      this.timeout(10000);
      var source = pathExtra.join(fixturesDir, 'test-app');
      var dest = configHelpers.modulePath('test-app');
{'fraction_non_alphanumeric': 0.1588785046728972, 'fraction_numerical': 0.004918839153959666, 'mean_word_length': 5.035608308605341, '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': '1655240', 'n_tokens_mistral': 622, 'n_tokens_neox': 609, 'n_words': 131}