20 lines
707 B
TypeScript
20 lines
707 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { describe, expect, it, vi } from "vitest";
|
|
import { App } from "../../src/App";
|
|
|
|
describe("Random Tools", () => {
|
|
it("renders the local workbench and standard shell", async () => {
|
|
vi.stubGlobal(
|
|
"fetch",
|
|
vi.fn(async () => new Response("Not found", { status: 404 })),
|
|
);
|
|
render(<App />);
|
|
expect(
|
|
await screen.findByRole("heading", { name: "Random Tools" }),
|
|
).toBeVisible();
|
|
expect(await screen.findByText("No network requests")).toBeVisible();
|
|
expect(screen.getByRole("tab", { name: "Draws" })).toBeVisible();
|
|
expect(screen.queryByText(/RANDOM\.ORG/iu)).not.toBeInTheDocument();
|
|
});
|
|
});
|