<commit_before>'use strict';

var ziptastic = require('../'),
    expect    = require('chai').expect,
    sinon     = require('sinon'),
    nock      = require('nock');

describe('Ziptastic — Unit Tests', function() {

	beforeEach(function() {
		this.ziptastic = new ziptastic.Ziptastic();
	});

	it('exports the parse function of an instance', function() {
		expect(ziptastic)
			.to.be.a('function');
	});

	it('it attaches the constructor to the export', function() {
		expect(ziptastic.Ziptastic)
			.to.be.a('function');
	});

	it('defaults to the public endpoint', function() {
		expect(this.ziptastic.endpoint)
			.to.equal('http://zip.elevenbasetwo.com/v2');
	});

	it('can be constructed with a custom endpoint', function() {
		var endpoint = 'ep';
		expect(new ziptastic.Ziptastic(endpoint).endpoint)
			.to.equal(endpoint);<commit_msg>Update default endpoint in unit tests<commit_after>'use strict';

var ziptastic = require('../'),
    expect    = require('chai').expect,
    sinon     = require('sinon'),
    nock      = require('nock');

describe('Ziptastic — Unit Tests', function() {

	beforeEach(function() {
		this.ziptastic = new ziptastic.Ziptastic();
	});

	it('exports the parse function of an instance', function() {
		expect(ziptastic)
			.to.be.a('function');
	});

	it('it attaches the constructor to the export', function() {
		expect(ziptastic.Ziptastic)
			.to.be.a('function');
	});

	it('defaults to the public endpoint', function() {
		expect(this.ziptastic.endpoint)
			.to.equal('http://zip.getziptastic.com/v2');
	});

	it('can be constructed with a custom endpoint', function() {
		var endpoint = 'ep';
		expect(new ziptastic.Ziptastic(endpoint).endpoint)
			.to.equal(endpoint);
{'fraction_non_alphanumeric': 0.16909620991253643, 'fraction_numerical': 0.0011661807580174927, 'mean_word_length': 4.047058823529412, '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': '2584933', 'n_tokens_mistral': 599, 'n_tokens_neox': 558, 'n_words': 128}