<commit_before>(function(){

    var body = document.querySelector('body'),
        elements = {
            cropArea  : document.createElement('div'),
            fileInput : document.createElement('input'),
            dropArea  : document.createElement('div')
        },
        closedElements = {},
        closedElementTagNames = [
            'area',
            'base',
            'br',
            'col',
            'command',
            'embed',
            'hr',
            'img',
            'input',
            'keygen',
            'link',
            'meta',
            'param',
            'source',
            'track',
            'wbr'
        ];

    closedElementTagNames.forEach(function(tagName, index){
        closedElements[tagName] = document.createElement(tagName);
    });

    describe("Settings Module", function(){

        it("will error when no element is available to upload a file.", function(){
            expect(function(){
                settingsModule(elements.cropArea,{});
            }).toThrowError(TypeError, "CropResize is unable to operate without a 'fileInput' or 'dropArea' element.");
        });

        it("will error when 'fileInput' is not an input of type 'file'",function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    fileInput:elements.fileInput
                });
            }).toThrowError(TypeError);
        });

        it("will error if 'DropArea' is a closed tag element.", function(){
            Object.keys(closedElements).forEach(function(element){
                expect(function(){
                    settingsModule(elements.cropArea,{
                        dropArea:element
                    });
                }).toThrowError(TypeError);
            });
        });

        it("will error if 'dropArea' is not an element in the DOM.", function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    dropArea:elements.dropArea
                });
            }).toThrowError(TypeError, "Invalid 'cropArea' element supplied to cropResize. Please ensure element is available in the DOM.");
        });

        it("will error if 'setRatio' uses a string without two separate numeric values", function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    fileInput:elements.fileInput,
                    setRatio:""
                })
            }).toThrowError(TypeError);<commit_msg>Updated settings test to correctly reference closed tag elements.<commit_after>(function(){

    var body = document.querySelector('body'),
        elements = {
            cropArea  : document.createElement('div'),
            fileInput : document.createElement('input'),
            dropArea  : document.createElement('div')
        },
        closedElements = [],
        closedElementTagNames = [
            'area',
            'base',
            'br',
            'col',
            'command',
            'embed',
            'hr',
            'img',
            'input',
            'keygen',
            'link',
            'meta',
            'param',
            'source',
            'track',
            'wbr'
        ];

    closedElementTagNames.forEach(function(tagName, index){
        closedElements.push(document.createElement(tagName));
    });

    describe("Settings Module", function(){

        it("will error when no element is available to upload a file.", function(){
            expect(function(){
                settingsModule(elements.cropArea,{});
            }).toThrowError(TypeError, "CropResize is unable to operate without a 'fileInput' or 'dropArea' element.");
        });

        it("will error when 'fileInput' is not an input of type 'file'",function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    fileInput:elements.fileInput
                });
            }).toThrowError(TypeError);
        });
        
        it("will error if 'DropArea' is a closed tag element.", function(){
            closedElements.forEach(function(element){
                expect(function(){
                    settingsModule(elements.cropArea,{
                        dropArea:element
                    });
                }).toThrowError(TypeError);
            });
        });

        it("will error if 'dropArea' is not an element in the DOM.", function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    dropArea:elements.dropArea
                });
            }).toThrowError(TypeError, "Invalid 'cropArea' element supplied to cropResize. Please ensure element is available in the DOM.");
        });

        it("will error if 'setRatio' uses a string without two separate numeric values", function(){
            expect(function(){
                settingsModule(elements.cropArea,{
                    fileInput:elements.fileInput,
                    setRatio:""
                })
            }).toThrowError(TypeError);
{'fraction_non_alphanumeric': 0.1158966327329679, 'fraction_numerical': 0.0, 'mean_word_length': 1.6092951991828397, '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': '6332222', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1154, 'n_words': 286}