Skip to content

Commit

Permalink
Install and Use Vitest UI
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCode92 committed Dec 22, 2024
1 parent 6ea8062 commit deedd16
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 1 deletion.
105 changes: 105 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "vite",
"build": "tsc -b && vite build",
"test": "vitest",
"test:ui": "vitest --ui",
"format": "prettier --write .",
"lint": "eslint .",
"preview": "vite preview",
Expand All @@ -30,6 +31,7 @@
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/eslint-plugin": "^1.1.18",
"@vitest/ui": "^2.1.8",
"autoprefixer": "^10.4.20",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/FormInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test("should render with the correct label", () => {
});

test("should apply shrink classes when input has value", () => {
render(<FormInput label="Username" value="test" />);
render(<FormInput label="Username" value="test" onChange={vi.fn()} />);
const labelElement = screen.getByText("Username");
expect(labelElement).toHaveClass("-top-5 text-xs text-black");
});
Expand Down

0 comments on commit deedd16

Please sign in to comment.