<commit_before>import { expect } from 'chai';

import getType, { SelectorType } from '../src/core/selector-type';

describe('getType(selector)', function() {
    describe('Selectors', () => {
        it('Invalid selector (E E)', () => {
            expect(getType('div span')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E.class.class)', () => {
            expect(getType('div.class1.class2')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E.class#id)', () => {
            expect(getType('div.class#id')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E#id#id)', () => {
            expect(getType('div#id1#id2')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E#id.class)', () => {
            expect(getType('div#id.class')).to.equal(SelectorType.Invalid);
        });
        
        it('Type selector (E)', () => {
            expect(getType('div')).to.equal(SelectorType.Type);
        });
        
        it('Attribute selector (E[foo])', () => {
            expect(getType('div[test]')).to.equal(SelectorType.Attribute);
        });<commit_msg>adds tests for more invalid selectors #2<commit_after>import { expect } from 'chai';

import getType, { SelectorType } from '../src/core/selector-type';

describe('getType(selector)', function() {
    describe('Selectors', () => {
        it('Invalid selector (E )', () => {
            expect(getType('div ')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector ( E)', () => {
            expect(getType(' div')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E E)', () => {
            expect(getType('div span')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E.class.class)', () => {
            expect(getType('div.class1.class2')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E.class#id)', () => {
            expect(getType('div.class#id')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E#id#id)', () => {
            expect(getType('div#id1#id2')).to.equal(SelectorType.Invalid);
        });
        
        it('Invalid selector (E#id.class)', () => {
            expect(getType('div#id.class')).to.equal(SelectorType.Invalid);
        });
        
        it('Type selector (E)', () => {
            expect(getType('div')).to.equal(SelectorType.Type);
        });
        
        it('Attribute selector (E[foo])', () => {
            expect(getType('div[test]')).to.equal(SelectorType.Attribute);
        });
{'fraction_non_alphanumeric': 0.1974805483512412, 'fraction_numerical': 0.0033345683586513525, 'mean_word_length': 2.202846975088968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3169751', 'n_tokens_mistral': 760, 'n_tokens_neox': 790, 'n_words': 100}