<commit_before>define(["pat-toggle"], function(pattern) {

    describe("pat-toggle", function() {

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

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

        describe("_update", function() {
            it("No targets", function() {
                spyOn(jQuery.fn, "toggleClass");
                spyOn(jQuery.fn, "removeAttr");
                spyOn(jQuery.fn, "attr");
                pattern._update(".missing");
                expect(jQuery.fn.toggleClass).not.toHaveBeenCalled();
                expect(jQuery.fn.removeAttr).not.toHaveBeenCalled();
                expect(jQuery.fn.attr).not.toHaveBeenCalled();
            });

            it("Toggle class", function() {
                $("#lab").html("<div id='victim' class='always'/>");
                pattern._update("#victim", "class", "check on", false);<commit_msg>Fix a jshint test error.<commit_after>define(["pat-toggle", "jquery"], function(pattern, $) {

    describe("pat-toggle", function() {

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

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

        describe("_update", function() {
            it("No targets", function() {
                spyOn($.fn, "toggleClass");
                spyOn($.fn, "removeAttr");
                spyOn($.fn, "attr");
                pattern._update(".missing");
                expect($.fn.toggleClass).not.toHaveBeenCalled();
                expect($.fn.removeAttr).not.toHaveBeenCalled();
                expect($.fn.attr).not.toHaveBeenCalled();
            });

            it("Toggle class", function() {
                $("#lab").html("<div id='victim' class='always'/>");
                pattern._update("#victim", "class", "check on", false);
{'fraction_non_alphanumeric': 0.19126819126819128, 'fraction_numerical': 0.0, 'mean_word_length': 1.9344512195121952, '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': '7557292', 'n_tokens_mistral': 538, 'n_tokens_neox': 519, 'n_words': 76}