mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-27 00:48:06 +08:00
26 lines
594 B
TypeScript
26 lines
594 B
TypeScript
/*
|
|
Copyright 2024 New Vector Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
Please see LICENSE in the repository root for full details.
|
|
*/
|
|
|
|
import { describe, expect, test } from "vitest";
|
|
import { render, configure } from "@testing-library/react";
|
|
|
|
import { QrCode } from "./QrCode";
|
|
|
|
configure({
|
|
defaultHidden: true,
|
|
});
|
|
|
|
describe("QrCode", () => {
|
|
test("renders", async () => {
|
|
const { container, findByRole } = render(
|
|
<QrCode data="foo" className="bar" />,
|
|
);
|
|
(await findByRole("img")) as HTMLImageElement;
|
|
expect(container.firstChild).toMatchSnapshot();
|
|
});
|
|
});
|