Addint test for the footer

This commit is contained in:
Carlos Patino
2020-10-23 15:02:51 +01:00
parent 1c45d54dff
commit a4ea5ac9e9
2 changed files with 180 additions and 0 deletions
@@ -0,0 +1,169 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Footer component Matches the snapshot 1`] = `
<div
className="bg-gray-100 p-4 flex flex-col justify-center items-center shadow-inner mt-2"
>
<div
className="w-full flex flex-col sm:flex-row justify-evenly py-2"
>
<div
className="ml-2 sm:ml-0 sm:mr-6 order-last sm:order-none flex"
>
<h1
className="text-base font-bold font-title text-xl sm:text-2xl mt-3 sm:mt-0"
>
<div
className="flex sm:flex-col items-start mb-3 sm:mb-0"
>
<img
alt="github profile markdown generator logo"
className="hidden sm:block h-24"
src="test-file-stub"
/>
<div
className="mr-2 sm:mr-0"
>
GitHub Profile
<img
alt="github profile markdown generator logo"
className="inline sm:hidden h-12"
src="test-file-stub"
/>
<span
className="block sm:inline"
>
README Generator
</span>
</div>
</div>
</h1>
</div>
<div
className="text-xl sm:text-base font-light sm:font-normal"
>
<div
className="font-title font-bold mb-4 sm:mb-2"
>
<strong>
Pages
</strong>
</div>
<div
className="ml-2 sm:ml-0"
>
<a
href="/addons"
>
Addons
</a>
</div>
<div
className="ml-2 sm:ml-0"
>
<a
href="/support"
>
Support
</a>
</div>
<div
className="ml-2 sm:ml-0"
>
<a
href="/about"
>
About
</a>
</div>
</div>
<div
className="text-xl sm:text-base font-light sm:font-normal"
>
<div
className="font-title font-bold my-4 sm:my-0 sm:mb-2"
>
<strong>
More
</strong>
</div>
<div
className="ml-2 sm:ml-0"
>
<a
aria-label="Github rahuldkjain/github-profile-readme-generator"
href="https://github.com/rahuldkjain/github-profile-readme-generator"
target="blank"
>
Github
</a>
</div>
<div
className="ml-2 sm:ml-0"
>
<a
aria-label="Releases on Github rahuldkjain/github-profile-readme-generator"
href="https://github.com/rahuldkjain/github-profile-readme-generator/releases"
target="blank"
>
Releases
</a>
</div>
<div>
<a
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
href="https://github.com/rahuldkjain/github-profile-readme-generator/issues"
target="blank"
>
Issues
</a>
</div>
<div>
<a
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
href="https://github.com/rahuldkjain/github-profile-readme-generator/pulls"
target="blank"
>
Pull Requests
</a>
</div>
</div>
<div>
<div
className="font-title font-bold text-xl sm:text-base my-4 sm:my-0 sm:mb-2"
>
<strong>
Join Community
</strong>
</div>
<div>
<a
aria-label="Discord of the community"
href="https://discord.gg/HHMs7Eg"
target="blank"
>
<img
alt="Discord of the community"
className="h-12"
src="test-file-stub"
/>
</a>
</div>
</div>
</div>
<div
className="py-2 mt-2"
>
Developed in India
<span
aria-label="india"
role="img"
>
🇮🇳
</span>
</div>
</div>
`;
+11
View File
@@ -0,0 +1,11 @@
import React from "react"
import renderer from "react-test-renderer"
import Footer from "../footer"
describe("Footer component", () => {
test("Matches the snapshot", () => {
const footer = renderer.create(<Footer />).toJSON();
expect(footer).toMatchSnapshot();
});
});