<commit_before><commit_msg>Add unit tests for faker-overrides<commit_after>var dynamicGenerators = require('../../lib/superstring/dynamic-generators'),
    expect = require('chai').expect;

describe('Overridden generator', function () {
    describe('PhoneNumber', function () {
        it('returns a random phone number without extension', function () {
            var phone1 = dynamicGenerators.PhoneNumber(),
                phone2 = dynamicGenerators.PhoneNumber();

            expect(phone1.length).to.equal(12);
            expect(phone2.length).to.equal(12);
            expect(phone1).to.not.equal(phone2);
        });
    });

    describe('Locale', function () {
        it('returns a random locale', function () {
            var locale1 = dynamicGenerators.Locale(),
                locale2 = dynamicGenerators.Locale();

            expect(locale1.length).to.equal(2);
            expect(locale2.length).to.equal(2);
            expect(locale1).to.not.equal(locale2);
        });
    });

    describe('PhoneNumberExt', function () {
        it('returns a random phone number with extension', function () {
            var phone1 = dynamicGenerators.PhoneNumberExt(),
                phone2 = dynamicGenerators.PhoneNumberExt();

            expect(phone1.length).to.equal(14);
            expect(phone1.length).to.equal(14);
            expect(phone1).to.not.equal(phone2);
        });
    });

    describe('Words', function () {
        it('returns some random numbers', function () {
            var words = dynamicGenerators.Words(),
                wordsArray = words.split(' ');

            expect(words).to.not.be.null;
            expect(wordsArray.length).to.be.at.least(2);
        });
    });
});

{'fraction_non_alphanumeric': 0.14492753623188406, 'fraction_numerical': 0.01681159420289855, 'mean_word_length': 2.30019120458891, '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': '5814717', 'n_tokens_mistral': 472, 'n_tokens_neox': 453, 'n_words': 77}