-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: adding search suggestions preview card snapshot test
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
open Vitest | ||
open Setup | ||
open Utils | ||
open ReactTestingLibrary | ||
open ReactTestRenderer | ||
open JsDom | ||
open GithubService | ||
|
||
describe("Search suggestion preview card component", _ => { | ||
test("should match component snapshot", t => { | ||
t->assertions(1) | ||
|
||
let item = { | ||
login: "johnny", | ||
avatarUrl: "#avatarUrl", | ||
} | ||
|
||
create(<SearchSuggestionsDisplay.UserPreview item />)->expect->toMatchSnapshot | ||
}) | ||
}) |
22 changes: 22 additions & 0 deletions
22
tests/Components/__snapshots__/SearchSuggestionsDisplay_test.bs.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Search suggestion preview card component > should match component snapshot 1`] = ` | ||
<a | ||
onClick={[Function]} | ||
> | ||
<div | ||
className="flex flex-row items-center gap-3 h-40 p-3 bg-gray-100 shadow-md cursor-pointer hover:scale-[1.02] transition-transform" | ||
> | ||
<img | ||
alt="Profile picture" | ||
className="rounded-lg border shadow-lg h-32" | ||
src="#avatarUrl" | ||
/> | ||
<h2 | ||
className="text-2xl text-[#4c4f69] " | ||
> | ||
johnny | ||
</h2> | ||
</div> | ||
</a> | ||
`; |
0723b2e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
github-profile-visualizer – ./
github-profile-visualizer.vercel.app
github-profile-visualizer-git-main-bronen.vercel.app
github-profile-visualizer-bronen.vercel.app