<commit_before>var assertValidIdentifier = require('../src/assertValidIdentifier');

describe('assertValidIdentifier', function () {

    it('should work for simple strings', function () {
        assertValidIdentifier.bind(null, 'foo').should.not.throw();
        assertValidIdentifier.bind(null, 'bar-foo').should.not.throw();
        assertValidIdentifier.bind(null, 'foo5').should.not.throw();
        assertValidIdentifier.bind(null, 'Foo').should.not.throw();
    });

    it('should fail if the identifier is invalid', function () {
        assertValidIdentifier.bind(null, '-foo').should.throw();
        assertValidIdentifier.bind(null, 'bar-').should.throw();
        assertValidIdentifier.bind(null, '5foo').should.throw();
        assertValidIdentifier.bind(null, 'éé').should.throw();
        assertValidIdentifier.bind(null, '').should.throw();
        assertValidIdentifier.bind(null, 'foo:bar').should.throw();
        assertValidIdentifier.bind(null, 'foo bar').should.throw();
        assertValidIdentifier.bind(null, 'foo.bar').should.throw();
        assertValidIdentifier.bind(null, 'foo>bar').should.throw();<commit_msg>Add more tests for assertValidIdentifier<commit_after>var assertValidIdentifier = require('../src/assertValidIdentifier');

describe('assertValidIdentifier', function () {

    it('should work for simple strings', function () {
        assertValidIdentifier.bind(null, 'foo').should.not.throw();
        assertValidIdentifier.bind(null, 'bar-foo').should.not.throw();
        assertValidIdentifier.bind(null, 'foo5').should.not.throw();
        assertValidIdentifier.bind(null, 'Foo').should.not.throw();
        assertValidIdentifier.bind(null, 'f').should.not.throw();
    });

    it('should fail if the identifier is invalid', function () {
        assertValidIdentifier.bind(null, '-foo').should.throw();
        assertValidIdentifier.bind(null, 'bar-').should.throw();
        assertValidIdentifier.bind(null, '5foo').should.throw();
        assertValidIdentifier.bind(null, 'éé').should.throw();
        assertValidIdentifier.bind(null, '').should.throw();
        assertValidIdentifier.bind(null, 'foo:bar').should.throw();
        assertValidIdentifier.bind(null, 'foo bar').should.throw();
        assertValidIdentifier.bind(null, 'foo.bar').should.throw();
        assertValidIdentifier.bind(null, 'foo>bar').should.throw();
        assertValidIdentifier.bind(null, '1').should.throw();
{'fraction_non_alphanumeric': 0.16523165231652318, 'fraction_numerical': 0.002050020500205002, 'mean_word_length': 4.104602510460251, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7033065', 'n_tokens_mistral': 661, 'n_tokens_neox': 652, 'n_words': 99}