<commit_before>var path = require('path');
var fs = require('fs');
var expect = require('expect.js');
var Git = require('node-git-simple');
var runTask = require('grunt-run-task');

describe('Update Working Examples', function () {
	var rootPath = './test/actual/updateexamples',
		corePath = path.join(rootPath, 'core'),
		distPath = path.join(rootPath, 'dist'),
		examplesPath = path.join(process.cwd(), rootPath, 'examples'),
		coreRepo, distRepo, cloneRepo, callback, testFile, cwd;

	var error = function(error) {
		if (callback) {
			callback(error);
		}
	};

	before(function(done){
		callback = done;

		cwd = process.cwd();

		fs.mkdirSync(rootPath);
		fs.mkdirSync(corePath);
		fs.mkdirSync(distPath);

		Git.create(corePath, true)
		.then(function(repo){
			coreRepo = repo;<commit_msg>IMproved the test error handling<commit_after>var path = require('path');
var fs = require('fs');
var expect = require('expect.js');
var Git = require('node-git-simple');
var runTask = require('grunt-run-task');

describe('Update Working Examples', function () {
	var rootPath = './test/actual/updateexamples',
		corePath = path.join(rootPath, 'core'),
		distPath = path.join(rootPath, 'dist'),
		examplesPath = path.join(process.cwd(), rootPath, 'examples'),
		coreRepo, distRepo, cloneRepo, callback, testFile, cwd;

	var error = function(error) {
		if (callback) {
			callback(error);
		}
		throw error;
	};

	before(function(done){
		callback = done;

		cwd = process.cwd();

		fs.mkdirSync(rootPath);
		fs.mkdirSync(corePath);
		fs.mkdirSync(distPath);

		Git.create(corePath, true)
		.then(function(repo){
			coreRepo = repo;
{'fraction_non_alphanumeric': 0.16523341523341523, 'fraction_numerical': 0.0, 'mean_word_length': 4.797153024911032, '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': '2062276', 'n_tokens_mistral': 599, 'n_tokens_neox': 543, 'n_words': 119}