BlueSky & more on desktop lazurite.stormlightlabs.org/
tauri rust typescript bluesky appview atproto solid
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 22 lines 820 B view raw
1import { fireEvent, render, screen, waitFor } from "@solidjs/testing-library"; 2import { beforeEach, describe, expect, it, vi } from "vitest"; 3import { ExternalEmbed } from "../embeds/ExternalEmbed"; 4 5const openUrlMock = vi.hoisted(() => vi.fn()); 6 7vi.mock("@tauri-apps/plugin-opener", () => ({ openUrl: openUrlMock })); 8 9describe("ExternalEmbed", () => { 10 beforeEach(() => { 11 vi.resetAllMocks(); 12 openUrlMock.mockResolvedValue(void 0); 13 }); 14 15 it("opens embed links with the system browser via the opener plugin", async () => { 16 render(() => <ExternalEmbed title="External article" uri="https://example.com/article" />); 17 18 fireEvent.click(screen.getByRole("link", { name: /external article/i })); 19 20 await waitFor(() => expect(openUrlMock).toHaveBeenCalledWith("https://example.com/article")); 21 }); 22});