Something went wrong. Try again.
A downstream fork of Tranquil PDS for use in margin.cafe
Something went wrong. Try again.
1234567891011121314151617181920212223import { render, screen } from "@testing-library/svelte";import { describe, expect, it, vi } from "vitest";import EmailVerifyStep from "../components/migration/EmailVerifyStep.svelte";
describe("EmailVerifyStep", () => { it("renders the verification identifier as text", () => { const identifier = '<img src=x onerror="alert(1)">@example.com';
const { container } = render(EmailVerifyStep, { channel: "email", identifier, token: "", loading: false, error: null, onTokenChange: vi.fn(), onSubmit: vi.fn(), onResend: vi.fn(), });
expect(container.querySelector("img")).not.toBeInTheDocument(); expect(screen.getByText(identifier, { exact: false })).toBeInTheDocument(); });});