<commit_before>define([
    'aux/prepend'
], function (prepend) {
    describe('Check if the node element is added to the parent', function () {
        var ele = document.createElement('div'),
            parent = document.createElement('div');

        it('Should call insertBefore and return the firstChild', function () {
            prepend(parent, ele);

            expect(parent.firstChild).toBe(ele);
        });
    });
});<commit_msg>Prepend tests changed and new added<commit_after>define([
    'aux/create-element',
    'aux/get-elements-by-class',
    'aux/has-class',
    'aux/prepend'
], function (createElement, getElementsByClass, hasClass, prepend) {
    describe('Check if the node element is added to the parent', function () {
        var ele,
            doc,
            childEle,
            customDocument,
            params;

        beforeEach(function () {

            customDocument = {
                createElement: function () {
                    return true;
                }
            };
            doc = top.document;
            childEle = createElement('div');
            params = {
                attr: {
                    'id': 'div-main'
                },
                css: {
                    border: '1px solid black',
                    backgroundColor: 'red'
                },
                cssNames: ['legen', 'wait-for-it', 'dary'],
                innerHTML: '<div class="futurama"><span class="bart"></span></div>',
                nodes: [
                    {
                        tag: 'div',
                        cssNames: 'family-guy',
                        nodes: {
                            tag: 'span',
                            cssNames: 'peter'
                        }
                    }
                ],
                children: [
                    childEle
                ]
            };
            ele = createElement('div', params, doc);
        });

        it('Should check if the parentNode has the class', function () {
            var eleOne = getElementsByClass(ele, 'futurama');

            expect(eleOne.length).toBe(1);
            expect(hasClass(eleOne[0].parentNode, 'legen')).toBeTruthy();
        });

        it('Should call insertBefore and return the firstChild', function () {

            var eleOne = getElementsByClass(ele, 'futurama'),
                parent = eleOne[0].parentNode,
                eleChild = createElement('div');

            prepend(parent, eleChild);

            expect(parent.firstChild).toBe(eleChild);
        });
    });
});
{'fraction_non_alphanumeric': 0.1200154858691444, 'fraction_numerical': 0.001548586914440573, 'mean_word_length': 1.3363471971066907, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5899055', 'n_tokens_mistral': 662, 'n_tokens_neox': 623, 'n_words': 143}