<commit_before>import { Presets2 } from "./presets2";
import { IPreset } from "../presets/preset";
import { ExpectedExpressions } from "../expected-expressions/expected-expressions";

describe("List of defined presets", () => {
    it("Returns a copy of presets list", () => {
        const presets = new Presets2<any>();
        const actual1 = presets.get();
        const actual2 = presets.get();

        expect(actual1).not.toBe(actual2);
    });

    it("Returns defined presets in LIFO order", () => {
        class Preset implements IPreset<unknown>{
            readonly invocable: () => boolean;
            readonly target: ExpectedExpressions<unknown>;
        }

        const preset1 = new Preset();<commit_msg>refactor(preset list): implement preset list<commit_after>import { Presets2 } from "./presets2";
import { IPreset } from "../presets/preset";
import { ExpectedExpressions } from "../expected-expressions/expected-expressions";

describe("List of defined presets", () => {
    it("Returns a copy of presets list", () => {
        const presets = new Presets2<any>();
        const actual1 = presets.get();
        const actual2 = presets.get();

        expect(actual1).not.toBe(actual2);
    });

    it("Returns defined presets in LIFO order", () => {
        class Preset implements IPreset<unknown> {
            readonly invocable: () => boolean;
            readonly target: ExpectedExpressions<unknown>;
        }

        const preset1 = new Preset();
{'fraction_non_alphanumeric': 0.13832658569500675, 'fraction_numerical': 0.010796221322537112, 'mean_word_length': 2.9026315789473682, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '6603971', 'n_tokens_mistral': 418, 'n_tokens_neox': 409, 'n_words': 109}