refactor: move to monorepo
This commit is contained in:
parent
f81e3e1dd6
commit
d891426a12
88 changed files with 403 additions and 160 deletions
19
apps/vojtechmares.com/tests/Button.test.tsx
Normal file
19
apps/vojtechmares.com/tests/Button.test.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { expect, test } from "vitest";
|
||||
import { render, screen, cleanup } from "@testing-library/react";
|
||||
import { Button } from "@/components/Button";
|
||||
|
||||
test("button", () => {
|
||||
render(<Button>Hello</Button>);
|
||||
|
||||
expect(screen.getByText("Hello")).toBeDefined();
|
||||
|
||||
cleanup();
|
||||
});
|
||||
|
||||
test("button-with-link", () => {
|
||||
render(<Button href="/country-road">Hello</Button>);
|
||||
|
||||
expect(screen.getByText("Hello").getAttribute("href")).toBe("/country-road");
|
||||
|
||||
cleanup();
|
||||
});
|
||||
Reference in a new issue