<commit_before>var modal = new ch.Modal(document.getElementById('modal'), {
        'content': 'test',
        'fx': 'none'
    }).show(),
    t = modal.trigger,
    c = modal.container;

describe('Modal', function () {

    it('should be defined on ch object', function () {
        expect(ch.hasOwnProperty('Modal')).toBeTruthy();
        expect(typeof ch.Modal).toEqual('function');
    });

    it('should return a new instance of Modal', function () {
        expect(modal instanceof ch.Modal).toBeTruthy();
    });
});

describe('It should have a container with', function () {

    it('role dialog', function () {
        expect(c.getAttribute('role')).toEqual('dialog');
    });

    it('specific CSS class names', function () {
        expect(ch.util.classList(c).contains('ch-modal')).toBeTruthy();
        expect(ch.util.classList(c).contains('ch-box-lite')).toBeTruthy();
    });

    it('specific width', function () {
        expect(c.style.width).toEqual('50%');
    });

    it('alignment', function () {
        expect(c.getAttribute('data-side')).toEqual('center');
        expect(c.getAttribute('data-align')).toEqual('center');
    });
});

describe('It should have an underlay', function () {

    it('that exists', function () {
        expect(document.querySelectorAll('.ch-underlay').length).toEqual(1);
    });

    it('with tabindex -1', function () {
        expect(document.querySelector('.ch-underlay').getAttribute('tabindex')).toEqual('-1');
    });

    it('that dissapears when Modal closes', function () {
        modal.hide();
        expect(document.querySelectorAll('.ch-underlay').length).toEqual(0);
    });
});<commit_msg>#1210 Typo fix in modal test<commit_after>var modal = new ch.Modal(document.getElementById('modal'), {
        'content': 'test',
        'fx': 'none'
    }).show(),
    t = modal.trigger,
    c = modal.container;

describe('Modal', function () {

    it('should be defined on ch object', function () {
        expect(ch.hasOwnProperty('Modal')).toBeTruthy();
        expect(typeof ch.Modal).toEqual('function');
    });

    it('should return a new instance of Modal', function () {
        expect(modal instanceof ch.Modal).toBeTruthy();
    });
});

describe('It should have a container with', function () {

    it('role dialog', function () {
        expect(c.getAttribute('role')).toEqual('dialog');
    });

    it('specific CSS class names', function () {
        expect(ch.util.classList(c).contains('ch-modal')).toBeTruthy();
        expect(ch.util.classList(c).contains('ch-box-lite')).toBeTruthy();
    });

    it('specific width', function () {
        expect(c.style.width).toEqual('50%');
    });

    it('alignment', function () {
        expect(c.getAttribute('data-side')).toEqual('center');
        expect(c.getAttribute('data-align')).toEqual('center');
    });
});

describe('It should have an underlay', function () {

    it('that exists', function () {
        expect(document.querySelectorAll('.ch-underlay').length).toEqual(1);
    });

    it('with tabindex -1', function () {
        expect(document.querySelector('.ch-underlay').getAttribute('tabindex')).toEqual('-1');
    });

    it('that disappears when Modal closes', function () {
        modal.hide();
        expect(document.querySelectorAll('.ch-underlay').length).toEqual(0);
    });
});
{'fraction_non_alphanumeric': 0.1931716082659479, 'fraction_numerical': 0.004791853848457622, 'mean_word_length': 3.238578680203046, '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': '4186780', 'n_tokens_mistral': 966, 'n_tokens_neox': 980, 'n_words': 175}