<commit_before>import {assert} from "chai";

import {Signal} from "../../../../src/org/osflash/signals/Signal";
import {GenericEvent} from "../../../../src/org/osflash/signals/events/GenericEvent";
import {ISlot} from "../../../../src/org/osflash/signals/ISlot";

describe("SlotTest", () => {

    let signal: Signal;

    beforeEach(() => {
        signal = new Signal();
    });

    it("add_listener_pause_then_resume_on_slot_should_dispatch", (done) => {
        let slot: ISlot = signal.add(listener);
        slot.enabled = false;
        slot.enabled = true;

        signal.dispatch(new GenericEvent());

        function listener(event: GenericEvent) {
            setTimeout(checkGenericEvent, 10, event, done);
        }


    });

    it("addOnce_listener_pause_then_resume_on_slot_should_dispatch", (done) => {
        let slot: ISlot = signal.addOnce(listener);
        slot.enabled = false;
        slot.enabled = true;
<commit_msg>Reformat code<commit_after>import {assert} from "chai";

import {Signal} from "../../../../src/org/osflash/signals/Signal";
import {GenericEvent} from "../../../../src/org/osflash/signals/events/GenericEvent";
import {ISlot} from "../../../../src/org/osflash/signals/ISlot";

describe("SlotTest", () => {

    let signal: Signal;

    beforeEach(() => {
        signal = new Signal();
    });

    it("add_listener_pause_then_resume_on_slot_should_dispatch", (done) => {
        let slot: ISlot = signal.add(listener);
        slot.enabled = false;
        slot.enabled = true;

        signal.dispatch(new GenericEvent());

        function listener(event: GenericEvent) {
            setTimeout(checkGenericEvent, 10, event, done);
        }

    });

    it("addOnce_listener_pause_then_resume_on_slot_should_dispatch", (done) => {
        let slot: ISlot = signal.addOnce(listener);
        slot.enabled = false;
        slot.enabled = true;

{'fraction_non_alphanumeric': 0.1669307976756471, 'fraction_numerical': 0.0021130480718436345, 'mean_word_length': 2.7064579256360077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3736240', 'n_tokens_mistral': 580, 'n_tokens_neox': 566, 'n_words': 107}