forked from SmartDropLabs/smartdrop-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFooter.test.tsx
More file actions
35 lines (27 loc) · 924 Bytes
/
Copy pathFooter.test.tsx
File metadata and controls
35 lines (27 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { ChakraProvider } from "@chakra-ui/react";
import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import Footer from "./Footer";
function renderFooter() {
return render(
<ChakraProvider>
<Footer />
</ChakraProvider>,
);
}
describe("Footer", () => {
it("renders as a footer landmark with the SmartDrop brand", () => {
renderFooter();
expect(screen.getByRole("contentinfo")).toBeTruthy();
expect(screen.getByText("SmartDrop")).toBeTruthy();
});
it("renders a Contributors link pointing at /contributors", () => {
renderFooter();
const link = screen.getByRole("link", { name: "Contributors" });
expect(link.getAttribute("href")).toBe("/contributors");
});
it("shows the current copyright year", () => {
renderFooter();
expect(screen.getByText(`© ${new Date().getFullYear()}`)).toBeTruthy();
});
});