<commit_before>import { createElement } from "lwc";
import Modal from "c/modal";

const CSS_CLASS = "modal-hidden";

describe("c-modal", () => {
    let element;

    afterEach(global.clearDOM);

    beforeEach(() => {
        element = createElement("c-modal", {
            is: Modal,
        });
    });

    it("renders the header content based on a public property and doesn not render the header slot", () => {
        const HEADER = "The modal header";
        element.header = HEADER;
        document.body.appendChild(element);

        return global.flushPromises().then(async () => {
            // Query h2 element for header. We use a CSS selector to distinguish
            // between the h2 tag for a header that's set via a public property
            // vs a h2 tag that's set via the slot.<commit_msg>[GETTING STARTED] Fixing broken test in modal<commit_after>import { createElement } from "lwc";
import { registerSa11yMatcher } from '@sa11y/jest'
import Modal from "c/modal";

const CSS_CLASS = "modal-hidden";
registerSa11yMatcher();

describe("c-modal", () => {
    let element;

    afterEach(global.clearDOM);

    beforeEach(() => {
        element = createElement("c-modal", {
            is: Modal,
        });
    });

    it("renders the header content based on a public property and doesn not render the header slot", () => {
        const HEADER = "The modal header";
        element.header = HEADER;
        document.body.appendChild(element);

        return global.flushPromises().then(async () => {
            // Query h2 element for header. We use a CSS selector to distinguish
            // between the h2 tag for a header that's set via a public property
            // vs a h2 tag that's set via the slot.
{'fraction_non_alphanumeric': 0.11404011461318052, 'fraction_numerical': 0.006876790830945559, 'mean_word_length': 2.498997995991984, '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': '4316858', 'n_tokens_mistral': 490, 'n_tokens_neox': 469, 'n_words': 170}