<commit_before>const path = require('path'),
	assert = require('chai').assert,
	mocks = require(path.resolve('test/mocks')),
	model = require(path.resolve('src/model/pokemon')),
	dao = require(path.resolve('src/dao/pokemon'));

describe('Pokémon Spec', function() {

	const _fullPokemon = mocks.fullValidToCreate;
	const _simplePokemon = mocks.simpleValidToCreate;

	before(function(done) {
		model.sync({force: true}).then(function () {
			dao.deleteOne({name: _fullPokemon.name}).then(function() {
				done();
			}).catch(function(err) {
				console.error(err);
			});
		});

	});

	after(function(done) {
		dao.deleteOne({name: _fullPokemon.name}).then(function() {
			done();
		}).catch(function(err) {
			console.error(err);
		});
	});

	it('should create full valid pokémon', function(done) {

		dao.create(_fullPokemon).then(function() {
			done();
		});
	});

	it('should create simple valid pokémon', function(done) {
		dao.create(_simplePokemon).then(function() {
			done();
		});
	});

	it('not should create pokémon passing blank/null name', function(done) {
		const _invalidPokemon = mocks.invalidToCreate;

		dao.create(_invalidPokemon).then(function() {
		}).catch(function() {
			done();
		});
	});
<commit_msg>IMPROVE tests .<commit_after>const path = require('path'),
	assert = require('chai').assert,
	mocks = require(path.resolve('test/mocks')),
	model = require(path.resolve('src/model/pokemon')),
	dao = require(path.resolve('src/dao/pokemon'));

describe('Pokémon Spec', function() {

	const _fullPokemon = mocks.fullValidToCreate;
	const _simplePokemon = mocks.simpleValidToCreate;

	before(function(done) {
		model.sync({force: true}).then(function () {
			dao.deleteOne({name: _fullPokemon.name}).then(function() {
				done();
			}).catch(function(err) {
				console.error(err);
			});
		});

	});

	after(function(done) {
		dao.deleteOne({name: _fullPokemon.name}).then(function() {

			dao.deleteOne({name: _simplePokemon.name}).then(function() {
				done();
			}).catch(function(err) {
				console.error(err);
			});

		}).catch(function(err) {
			console.error(err);
		});
	});

	it('should create full valid pokémon', function(done) {

		dao.create(_fullPokemon).then(function() {
			done();
		});
	});

	it('should create simple valid pokémon', function(done) {
		dao.create(_simplePokemon).then(function() {
			done();
		});
	});

	it('should create valid simple pokémon and find then', function(done) {
		dao.create(_simplePokemon).then(function() {

			dao.findOne({name: _simplePokemon.name}).then(function(fetched) {
				assert.ok(fetched.name === _simplePokemon.name);
				assert.ok(fetched.price === _simplePokemon.price);
				assert.property(fetched, 'id');
				assert.ok(fetched.id !== null);
				assert.property(fetched, 'createdAt');
				assert.property(fetched, 'updatedAt');

				done();
			});

		});
	});

	it('should create valid full pokémon and find then', function(done) {
		dao.create(_fullPokemon).then(function() {

			dao.findOne({name: _fullPokemon.name}).then(function(fetched) {
				assert.ok(fetched.name === _fullPokemon.name);
				assert.ok(fetched.price === _fullPokemon.price);
				assert.property(fetched, 'id');
				assert.ok(fetched.id !== null);
				assert.property(fetched, 'createdAt');
				assert.property(fetched, 'updatedAt');

				done();
			});

		});
	});

	it('not should create pokémon passing blank/null name', function(done) {
		const _invalidPokemon = mocks.invalidToCreate;

		dao.create(_invalidPokemon).then(function() {
		}).catch(function() {
			done();
		});
	});

{'fraction_non_alphanumeric': 0.18563380281690142, 'fraction_numerical': 0.0, 'mean_word_length': 4.463076923076923, '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': '5769539', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1224, 'n_words': 184}