test: add component tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import TextBar from "$components/layout/TextBar.svelte";
|
||||
import { render } from "@testing-library/svelte";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("TextBar.svelte", () => {
|
||||
it("should render without crashing", () => {
|
||||
const { container } = render(TextBar);
|
||||
expect(container).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should have text-bar class", () => {
|
||||
const { container } = render(TextBar);
|
||||
const textBar = container.querySelector(".text-bar");
|
||||
expect(textBar).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user