build: add react vite scaffold
This commit is contained in:
parent
abfb885851
commit
f6d6d39a7b
9 changed files with 254 additions and 8 deletions
21
src/App.test.tsx
Normal file
21
src/App.test.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { renderToString } from "react-dom/server";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { AppStateView } from "./App";
|
||||
|
||||
describe("React app dashboard state view", () => {
|
||||
test("renders loading dashboard state", () => {
|
||||
const html = renderToString(
|
||||
<AppStateView
|
||||
dashboard={{
|
||||
state: "loading",
|
||||
title: "Loading Dashboard",
|
||||
subtitle: "Fetching active model",
|
||||
message: "Waiting for the active dashboard document.",
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain("Loading Dashboard");
|
||||
expect(html).toContain("Fetching active model");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue