<commit_before>/**
 * Tests for event/addListener
 * @author <NAME> [<EMAIL>]
 * @requires event/addListener
 */
define([
    'events/removeListener',
    'events/addListener'
], function (removeListener, addListener) {
    module('events');

    var linkElem = document.createElement('a');
    linkElem.setAttribute('href', '#success');
    linkElem.innerText = ('test');
    document.getElementById('qunit-fixture').appendChild(linkElem);

    asyncTest('removeListener', function () {

        var removeEventTest = window.setTimeout(function () {
            ok(true, 'Click event was not heard - Success.');
            start();
        }, 100);

        addListener(linkElem, 'click', function (event) {
            window.clearTimeout(removeEventTest);
            ok(false, 'Click event heard on test element - Fail.');
            start();
        });<commit_msg>Removing href from link, to prevent onward progression though the link.<commit_after>/**
 * Tests for event/addListener
 * @author <NAME> [<EMAIL>]
 * @requires event/addListener
 */
define([
    'events/removeListener',
    'events/addListener'
], function (removeListener, addListener) {
    module('events');

    var linkElem = document.createElement('a');
    linkElem.innerText = ('test');
    document.getElementById('qunit-fixture').appendChild(linkElem);

    asyncTest('removeListener', function () {

        var removeEventTest = window.setTimeout(function () {
            ok(true, 'Click event was not heard - Success.');
            start();
        }, 100);

        addListener(linkElem, 'click', function (event) {
            window.clearTimeout(removeEventTest);
            ok(false, 'Click event heard on test element - Fail.');
            start();
        });
{'fraction_non_alphanumeric': 0.14245014245014245, 'fraction_numerical': 0.003418803418803419, 'mean_word_length': 2.963882618510158, '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': '947163', 'n_tokens_mistral': 475, 'n_tokens_neox': 459, 'n_words': 112}