test markdown.js
This commit is contained in:
@@ -8,7 +8,7 @@ exports[`Footer component Matches the snapshot 1`] = `
|
||||
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"
|
||||
className="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"
|
||||
@@ -110,7 +110,9 @@ exports[`Footer component Matches the snapshot 1`] = `
|
||||
Releases
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/issues"
|
||||
@@ -119,7 +121,9 @@ exports[`Footer component Matches the snapshot 1`] = `
|
||||
Issues
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
className="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
|
||||
href="https://github.com/rahuldkjain/github-profile-readme-generator/pulls"
|
||||
@@ -137,7 +141,9 @@ exports[`Footer component Matches the snapshot 1`] = `
|
||||
Join Community
|
||||
</strong>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="ml-2 sm:ml-0"
|
||||
>
|
||||
<a
|
||||
aria-label="Discord of the community"
|
||||
href="https://discord.gg/HHMs7Eg"
|
||||
|
||||
@@ -0,0 +1,889 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Markdown renders correctly 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders devDynamicBlogs is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Blogs posts
|
||||
<br />
|
||||
<!-- BLOG-POST-LIST:START -->
|
||||
<br />
|
||||
<!-- BLOG-POST-LIST:END -->
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders githubProfileTrophy is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<p align="left"> <a href="https://github.com/ryo-ma/github-profile-trophy"><img src="https://github-profile-trophy.vercel.app/?username=undefined" alt="undefined" /></a> </p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders githubProfileTrophy is true 2`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<p align="left"> <a href="https://github.com/ryo-ma/github-profile-trophy"><img src="https://github-profile-trophy.vercel.app/?username=undefined" alt="undefined" /></a> </p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders topLanguages is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<p><img align="center" src="https://github-readme-stats.vercel.app/api/top-langs?username=undefined&show_icons=true&locale=en&layout=compact" alt="undefined" /></p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders topLanguages is true and githubStats is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<p><img align="left" src="https://github-readme-stats.vercel.app/api/top-langs?username=undefined&show_icons=true&locale=en&layout=compact" alt="undefined" /></p>
|
||||
<br />
|
||||
<br />
|
||||
<p> <img align="center" src="https://github-readme-stats.vercel.app/api?username=undefined&show_icons=true&locale=en" alt="undefined" /></p>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders twitterBadge is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<p align="left"> <a href="https://twitter.com/undefined" target="blank"><img src="https://img.shields.io/twitter/follow/undefined?logo=twitter&style=for-the-badge" alt="undefined" /></a> </p>
|
||||
<br />
|
||||
<br />
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders visitorsBadge is true 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
<p align="left"> <img src="https://komarev.com/ghpvc/?username=undefined&label=Profile%20views&color=0e75b6&style=flat" alt="undefined" /> </p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders without link.currentWork 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on **currentWork**
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders without prefix.title and data.title 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
|
||||
<h3 align="center">A passionate frontend developer from India</h3>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown renders without subtitle 1`] = `
|
||||
<div
|
||||
className="break-words"
|
||||
id="markdown-content"
|
||||
>
|
||||
<h1 align="center">Hi 👋, I'm title</h1>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
- 🔭 I’m currently working on [currentWork](currentWork)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
- 👯 I’m looking to collaborate on [collaborateOn](collaborateOn)
|
||||
<br />
|
||||
<br />
|
||||
- 🤝 I’m looking for help with [helpWith](helpWith)
|
||||
<br />
|
||||
<br />
|
||||
- 👨💻 All of my projects are available at [portfolio](portfolio)
|
||||
<br />
|
||||
<br />
|
||||
- 📝 I regulary write articles on [blog](blog)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
- 📄 Know about my experiences [resume](resume)
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<h3 align="left">Connect with me:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<br />
|
||||
|
||||
<a href="https://dev.to/dev" target="blank"><img align="center" src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg" alt="dev" height="30" width="40" /></a>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<h3 align="left">Languages and Tools:</h3>
|
||||
<br />
|
||||
<p align="left">
|
||||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
||||
<img src="https://devicons.github.io/devicon/devicon.git/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,233 @@
|
||||
import React from "react"
|
||||
import renderer from "react-test-renderer"
|
||||
|
||||
import Markdown from "../markdown"
|
||||
|
||||
describe("Markdown", () => {
|
||||
const props = {
|
||||
data: {
|
||||
ama: '',
|
||||
badgeColor: '0e75b6',
|
||||
badgeLabel: 'Profile views',
|
||||
badgeStyle: 'flat',
|
||||
collaborateOn: '',
|
||||
contact: '',
|
||||
currentLearn: '',
|
||||
currentWork: 'currentWork',
|
||||
devDynamicBlogs: false,
|
||||
funFact: '',
|
||||
githubProfileTrophy: false,
|
||||
githubStats: false,
|
||||
githubStatsOptions: {
|
||||
bgColor: '',
|
||||
cacheSeconds: null,
|
||||
hideBorder: false,
|
||||
locale: 'en',
|
||||
textColor: '',
|
||||
theme: '',
|
||||
titleColor: '',
|
||||
},
|
||||
helpWith: '',
|
||||
mediumDynamicBlogs: false,
|
||||
rssDynamicBlogs: false,
|
||||
subtitle: 'A passionate frontend developer from India',
|
||||
title: 'title',
|
||||
topLanguages: false,
|
||||
topLanguagesOptions: {
|
||||
bgColor: '',
|
||||
cacheSeconds: null,
|
||||
hideBorder: false,
|
||||
locale: 'en',
|
||||
textColor: '',
|
||||
theme: '',
|
||||
titleColor: '',
|
||||
},
|
||||
twitterBadge: false,
|
||||
visitorsBadge: false,
|
||||
},
|
||||
link: {
|
||||
blog: 'blog',
|
||||
collaborateOn: 'collaborateOn',
|
||||
currentWork: 'currentWork',
|
||||
helpWith: 'helpWith',
|
||||
portfolio: 'portfolio',
|
||||
resume: 'resume',
|
||||
},
|
||||
prefix: {
|
||||
ama: '💬 Ask me about',
|
||||
blog: '📝 I regulary write articles on',
|
||||
collaborateOn: '👯 I’m looking to collaborate on',
|
||||
contact: '📫 How to reach me',
|
||||
currentLearn: '🌱 I’m currently learning',
|
||||
currentWork: '🔭 I’m currently working on',
|
||||
funFact: '⚡ Fun fact',
|
||||
helpWith: '🤝 I’m looking for help with',
|
||||
portfolio: '👨💻 All of my projects are available at',
|
||||
resume: '📄 Know about my experiences',
|
||||
title: "Hi 👋, I'm",
|
||||
},
|
||||
skills: {
|
||||
javascript: true,
|
||||
express: false,
|
||||
},
|
||||
social: {
|
||||
dev: 'dev',
|
||||
codechef: '',
|
||||
},
|
||||
};
|
||||
|
||||
it("renders correctly", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders without subtitle", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
subtitle: '',
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders without prefix.title and data.title", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
title: '',
|
||||
}}
|
||||
prefix={{
|
||||
...props.prefix,
|
||||
title: '',
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders topLanguages is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
topLanguages: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders topLanguages is true and githubStats is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
topLanguages: true,
|
||||
githubStats: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders devDynamicBlogs is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
devDynamicBlogs: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders without link.currentWork", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
link={{
|
||||
...props.data,
|
||||
currentWork: '',
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders visitorsBadge is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
visitorsBadge: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders twitterBadge is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
twitterBadge: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders githubProfileTrophy is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
githubProfileTrophy: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("renders githubProfileTrophy is true", () => {
|
||||
const tree = renderer.create(
|
||||
<Markdown
|
||||
{...props}
|
||||
data={{
|
||||
...props.data,
|
||||
githubProfileTrophy: true,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
.toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
@@ -238,6 +238,7 @@ const Markdown = props => {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
return (
|
||||
<div id="markdown-content" className="break-words">
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user