<commit_before>import { join } from 'path';
import { mkdirs, copy, replaceCode, addNpmPackage, addNpmScript } from '../utils';

async function generateTestingMocha(params) {
  const build = join(__base, 'build', params.uuid);

  switch (params.framework) {
    case 'express':
      await addNpmPackage('chai', params, true);
      await addNpmPackage('mocha', params, true);
      await addNpmPackage('karma', params, true);
      await addNpmPackage('karma-chai', params, true);
      await addNpmPackage('karma-coverage', params, true);
      await addNpmPackage('karma-mocha', params, true);
      await addNpmPackage('sinon', params, true);
      await addNpmPackage('sinon-chai', params, true);
      await addNpmPackage('supertest', params, true);

      await addNpmScript('test', 'mocha --reporter spec --timeout 5000', params, true);

      await mkdirs(join(build, 'test'));
      await copy(join(__dirname, 'modules', 'mocha', 'app.test.js'), join(build, 'test'));
      break;
    case 'hapi':
      break;
    case 'meteor':
      break;
    default:
  }
}

export default generateTestingMocha;<commit_msg>Fixed copy path in mocha test generator<commit_after>import { join } from 'path';
import { mkdirs, cpy, copy, replaceCode, addNpmPackage, addNpmScript } from '../utils';

async function generateTestingMocha(params) {
  const build = join(__base, 'build', params.uuid);

  switch (params.framework) {
    case 'express':
      await addNpmPackage('chai', params, true);
      await addNpmPackage('mocha', params, true);
      await addNpmPackage('karma', params, true);
      await addNpmPackage('karma-chai', params, true);
      await addNpmPackage('karma-coverage', params, true);
      await addNpmPackage('karma-mocha', params, true);
      await addNpmPackage('sinon', params, true);
      await addNpmPackage('sinon-chai', params, true);
      await addNpmPackage('supertest', params, true);

      await addNpmScript('test', 'mocha --reporter spec --timeout 5000', params, true);

      await mkdirs(join(build, 'test'));

      await cpy([
        join(__dirname, 'modules', 'mocha', 'app.test.js')
        ], join(build, 'test'));
      break;
    case 'hapi':
      break;
    case 'meteor':
      break;
    default:
  }
}

export default generateTestingMocha;
{'fraction_non_alphanumeric': 0.1436054124836316, 'fraction_numerical': 0.003491924923614142, 'mean_word_length': 3.706365503080082, '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': '4615155', 'n_tokens_mistral': 736, 'n_tokens_neox': 729, 'n_words': 187}