forked from accordproject/template-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFooter.test.tsx
More file actions
92 lines (88 loc) · 2.36 KB
/
Footer.test.tsx
File metadata and controls
92 lines (88 loc) · 2.36 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { render } from "@testing-library/react";
import { describe, it, expect, vi, beforeAll } from "vitest";
import Footer from "../../components/Footer";
vi.mock("../../public/logo.png", () => ({
default: "logo.png",
}));
vi.mock("../constants/content/footer.json", () => ({
sections: [
{
title: "ABOUT",
links: [
{ title: "About the AP", href: "https://accordproject.org/about/" },
{
title: "FAQ",
href: "https://accordproject.org/frequently-asked-questions/",
},
{
title: "White Paper",
href: "https://accordproject.org/whitepaper-2024/",
},
],
},
{
title: "COMMUNITY",
links: [
{ title: "Contribute", href: "https://accordproject.org/contribute/" },
{
title: "Tech WG",
href: "https://accordproject.org/working-groups/technology/",
},
{
title: "Join Discord",
href: "https://discord.com/invite/Zm99SKhhtA",
external: true,
},
],
},
{
title: "PROJECTS",
links: [
{
title: "Concerto",
href: "https://accordproject.org/projects/concerto/",
},
{
title: "VS Code Extension",
href: "https://marketplace.visualstudio.com/items?itemName=accordproject.concerto-vscode-extension",
},
{
title: "Markdown Transform",
href: "https://github.com/accordproject/markdown-transform",
},
],
},
{
title: "RESOURCES",
links: [
{
title: "Template Library",
href: "https://templates.accordproject.org/",
},
{
title: "Model Repository",
href: "https://models.accordproject.org/",
},
{ title: "Videos", href: "https://vimeo.com/accordproject" },
{
title: "GitHub",
href: "https://github.com/accordproject",
},
{ title: "Documentation", href: "https://docs.accordproject.org/" },
],
},
],
}));
beforeAll(() => {
window.matchMedia = vi.fn().mockImplementation(() => ({
matches: false,
addListener: vi.fn(),
removeListener: vi.fn(),
}));
});
describe("Footer", () => {
it("matches the snapshot", () => {
const { asFragment } = render(<Footer />);
expect(asFragment()).toMatchSnapshot();
});
});