Skip to content

Commit

Permalink
update:Add->HomeSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAnonitos committed May 18, 2024
1 parent e35c36c commit da8fe72
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions __tests__/pages/Home.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ describe('HomePage', () => {
).toBeInTheDocument();
});

it('should match the snapshot', () => {
const { asFragment } = render(<HomePage />);
expect(asFragment()).toMatchSnapshot();
});

it("should render the Feed Component", async () => {
render(<HomePage />)

Expand Down
32 changes: 32 additions & 0 deletions __tests__/pages/__snapshots__/Home.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`HomePage should match the snapshot 1`] = `
<DocumentFragment>
<section
class="w-full flex-center flex-col"
>
<h1
class="head_text text-center "
>
Discover & Share
<br
class="max-md:hidden"
/>
<span
class="orange_gradient text-center"
>
Generative AI-Prompts
</span>
</h1>
<p
class="desc text-center"
>
PromptApp is an open-source AI prompting tool for modern world to discover, create and share creative prompts.
</p>
<div
data-testid="feed-mock"
>
Mocked Feed
</div>
</section>
</DocumentFragment>
`;

exports[`HomePage should render a HomePage Header text 1`] = `
[
<h1
Expand Down

0 comments on commit da8fe72

Please sign in to comment.