feat(web): scaffold Vite + React + TS SPA with Vitest
Bootstraps the web/ SPA: Vite 6 + React 19 + TypeScript 5.8, Vitest with jsdom, @testing-library/react, and a green smoke test asserting the App renders its Collection heading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { App } from "./app";
|
||||
|
||||
test("renders the app placeholder", () => {
|
||||
render(<App />);
|
||||
expect(screen.getByRole("heading", { name: /collection/i })).toBeInTheDocument();
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export function App() {
|
||||
return <h1>Collection</h1>;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { App } from "./app";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user