<commit_before>define(["pat/select-option"], function(pattern) {

    describe("Select-option pattern", function() {

        beforeEach(function() {
            $("<div/>", {id: "lab"}).appendTo(document.body);
        });

        afterEach(function() {
            $("#lab").remove();
        });

        describe("init", function() {
            it("Trigger onChange on initial load", function() {
                $("#lab").html("<label><select><option selected=\"selected\">Foo</option></select></label>");
                spyOn(pattern, "_onChange");
                pattern.init($("#lab select"));
                expect(pattern._onChange).toHaveBeenCalled();
            });

        });

        describe("_onChange", function() {
            it("Select without label", function() {
                // Just in case the label was removed later
                $("#lab").html("<select><option selected=\"selected\">Foo</option></select>");
                var select = $("#lab select")[0];
                pattern._onChange.apply(document.getElementById("select"), []);
            });

            it("Select with label", function() {
                $("#lab").html("<label><select><option selected=\"selected\" value=\"value\">Foo</option></select>");<commit_msg>Fix error in select-option test.<commit_after>define(["pat/select-option"], function(pattern) {

    describe("Select-option pattern", function() {

        beforeEach(function() {
            $("<div/>", {id: "lab"}).appendTo(document.body);
        });

        afterEach(function() {
            $("#lab").remove();
        });

        describe("init", function() {
            it("Trigger onChange on initial load", function() {
                $("#lab").html("<label><select><option selected=\"selected\">Foo</option></select></label>");
                spyOn(pattern, "_onChange");
                pattern.init($("#lab select"));
                expect(pattern._onChange).toHaveBeenCalled();
            });

        });

        describe("_onChange", function() {
            it("Select without label", function() {
                // Just in case the label was removed later
                $("#lab").html("<select><option selected=\"selected\">Foo</option></select>");
                var select = $("#lab select")[0];
                pattern._onChange.apply(select, []);
            });

            it("Select with label", function() {
                $("#lab").html("<label><select><option selected=\"selected\" value=\"value\">Foo</option></select>");
{'fraction_non_alphanumeric': 0.19582348305752562, 'fraction_numerical': 0.0007880220646178094, 'mean_word_length': 2.165835411471322, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3596915', 'n_tokens_mistral': 633, 'n_tokens_neox': 612, 'n_words': 111}