<commit_before>'use strict';

var Pasquale = require('../src/main.js')
	,	assert = require('assert')
	, pasquale = null;

describe('Pasquale', function () {

	beforeEach(function () {
		pasquale = new Pasquale();
	});

	it('should be defined', function () {
		assert(!!pasquale);
	});



});
<commit_msg>adds test<commit_after>'use strict';

var Pasquale = require('../src/main.js')
	,	assert = require('assert')
	, pasquale = null;

describe('Pasquale', function () {

	pasquale = new Pasquale();
	pasquale.setLanguage('pt-br');

	it('should be defined', function () {
		assert(!!pasquale);
	});

	describe('when checking,', function () {
		it('should not have suggestions in a correct text', function (done) {
			var text = 'isto está ok'

			pasquale.checkTextSpell('palavras corretas').then(function (results) {

				results.forEach(function (result) {
					assert(!result.suggestions);
				});

				done();
			}, function (err) {
				done(err);
			});
		});


		it('should have suggestions in an incorrect text', function (done) {
			var text = 'isto está ok'

			pasquale.checkTextSpell('palavras correttas').then(function (results) {
				var oneSuggestion = false;

				results.forEach(function (result) {
					if (result.suggestions)
						oneSuggestion = true;
				});

				assert(oneSuggestion);
				done();
			}, function (err) {
				done(err);
			});
		});
	});

});

{'fraction_non_alphanumeric': 0.17258883248730963, 'fraction_numerical': 0.0, 'mean_word_length': 3.6, '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': '1319603', 'n_tokens_mistral': 544, 'n_tokens_neox': 455, 'n_words': 100}