Backend and frontend testing stacks (pytest + vitest) and a few initial tests.
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"test": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
@@ -14,6 +15,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-react": "^4.2.0",
|
||||
"vite": "^5.0.0"
|
||||
"@testing-library/jest-dom": "^6.4.2",
|
||||
"@testing-library/react": "^14.2.1",
|
||||
"jsdom": "^24.0.0",
|
||||
"vite": "^5.0.0",
|
||||
"vitest": "^1.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import App from "./App.jsx";
|
||||
|
||||
|
||||
describe("App", () => {
|
||||
it("renders the hero copy", () => {
|
||||
render(<App />);
|
||||
expect(
|
||||
screen.getByText("Find, compare, and book top salons near you.")
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
import "@testing-library/jest-dom";
|
||||
@@ -7,5 +7,9 @@ export default defineConfig({
|
||||
proxy: {
|
||||
"/api": "http://localhost:8000"
|
||||
}
|
||||
},
|
||||
test: {
|
||||
environment: "jsdom",
|
||||
setupFiles: "./src/test/setupTests.js"
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user