Skip to content

Commit 24858a4

Browse files
committed
Add a test for showing the theme image.
1 parent 143a3e9 commit 24858a4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Footer.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import "@testing-library/jest-dom";
44
import dlsLogo from "../public/generic/logo-short.svg";
55
import { Footer, FooterLink, FooterLinks } from "./Footer";
66
import { ImageColorSchemeSwitch } from "./ImageColorSchemeSwitch";
7+
import {ThemeProvider} from "../themes/ThemeProvider";
78

89
jest.mock("./ImageColorSchemeSwitch");
910
// @ts-expect-error: doesn't find mockImplementation outside of testing.
@@ -17,6 +18,12 @@ describe("Footer", () => {
1718
// No copyright text
1819
expect(screen.queryByRole("paragraph")).not.toBeInTheDocument();
1920
});
21+
22+
test("Should render logo via theme", () => {
23+
render(<ThemeProvider><Footer logo="theme" /></ThemeProvider>);
24+
25+
expect(screen.getByRole("img")).toBeInTheDocument();
26+
});
2027

2128
test("Should render copyright only", async () => {
2229
const copyrightText = "add text here";

0 commit comments

Comments
 (0)