Skip to content

Commit 40ccef2

Browse files
committed
Refactored test cases to use enzyme
1 parent 7a61290 commit 40ccef2

File tree

2 files changed

+139
-416
lines changed

2 files changed

+139
-416
lines changed
Lines changed: 67 additions & 312 deletions
Original file line numberDiff line numberDiff line change
@@ -1,314 +1,69 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`DisplaySocial Preview renders correctly 1`] = `
4-
<a
5-
className="no-underline text-blue-700 m-2"
6-
href="https://codepen.io/dummy"
7-
target="blank"
8-
>
9-
<img
10-
alt="props.username"
11-
className="w-6 h-6"
12-
src="https://cdn.jsdelivr.net/npm/[email protected]/icons/codepen.svg"
13-
/>
14-
</a>
15-
`;
16-
17-
exports[`DisplaySocial Preview renders correctly with no username 1`] = `null`;
18-
19-
exports[`DisplayWork Preview renders correctly 1`] = `
20-
<div
21-
className="my-2"
22-
>
23-
[object Object]
24-
<a
25-
className="no-underline text-blue-700"
26-
href="https://dummy.com"
27-
target="blank"
28-
>
29-
readme-generator
30-
</a>
31-
</div>
32-
`;
33-
34-
exports[`DisplayWork Preview renders correctly with no link 1`] = `
35-
<div
36-
className="my-2"
37-
>
38-
[object Object]
39-
<b>
40-
readme-generator
41-
</b>
42-
</div>
43-
`;
44-
45-
exports[`DisplayWork Preview renders correctly with no prefix 1`] = `null`;
46-
47-
exports[`DisplayWork Preview renders correctly with no prefix and link 1`] = `null`;
48-
49-
exports[`DisplayWork Preview renders correctly with no prefix, link and project 1`] = `null`;
50-
51-
exports[`DisplayWork Preview renders correctly with no project 1`] = `
52-
<div
53-
className="my-2"
54-
>
55-
[object Object]
56-
<a
57-
className="no-underline text-blue-700"
58-
href="https://dummy.com"
59-
target="blank"
60-
>
61-
https://dummy.com
62-
</a>
63-
</div>
64-
`;
65-
66-
exports[`DisplayWork Preview renders correctly with no project and link 1`] = `null`;
67-
68-
exports[`DisplayWork Preview renders correctly with no project and prefix 1`] = `null`;
69-
70-
exports[`GitHubStats Preview renders correctly 1`] = `null`;
71-
72-
exports[`GitHubStats Preview renders correctly 2`] = `
73-
<div
74-
className="text-center mx-4 mb-4"
75-
>
76-
<img
77-
alt=""
78-
src="https://github-readme-stats.vercel.app/api?username=&show_icons=true&locale=en"
79-
/>
80-
</div>
81-
`;
82-
83-
exports[`GithubProfileTrophy Preview renders correctly 1`] = `null`;
84-
85-
exports[`GithubProfileTrophy Preview renders correctly with show true 1`] = `
86-
<div
87-
className="text-left my-2"
88-
>
89-
90-
<a
91-
href="https://github.com/ryo-ma/github-profile-trophy"
92-
>
93-
<img
94-
alt=""
95-
src="https://github-profile-trophy.vercel.app/?username="
96-
/>
97-
</a>
98-
99-
</div>
100-
`;
101-
102-
exports[`Markdown Preview renders correctly 1`] = `
103-
<div
104-
id="markdown-preview"
105-
>
106-
<h1
107-
className="text-center text-xl font-bold"
108-
>
109-
Hi 👋, I'm dummy
110-
</h1>
111-
<h3
112-
className="text-center font-medium"
113-
>
114-
A passionate frontend developer from India
115-
</h3>
116-
<div
117-
className="my-2"
118-
>
119-
🔭 I’m currently working on
120-
<a
121-
className="no-underline text-blue-700"
122-
href="https://dummy.com"
123-
target="blank"
124-
>
125-
readme-generator
126-
</a>
127-
</div>
128-
<div
129-
className="flex justify-start items-end flex-wrap"
130-
>
131-
<h3
132-
className="w-full text-lg sm:text-xl"
133-
>
134-
Connect with me:
135-
</h3>
136-
<a
137-
className="no-underline text-blue-700 m-2"
138-
href="https://codepen.io/dummy"
139-
target="blank"
140-
>
141-
<img
142-
alt="props.username"
143-
className="w-6 h-6"
144-
src="https://cdn.jsdelivr.net/npm/[email protected]/icons/codepen.svg"
145-
/>
146-
</a>
147-
</div>
148-
149-
<div
150-
className="block sm:flex sm:justify-center sm:items-start"
151-
>
152-
<div
153-
className="text-center mx-4 mb-4"
154-
>
155-
 
156-
</div>
157-
</div>
158-
</div>
159-
`;
160-
161-
exports[`SectionTitle Preview renders correctly 1`] = `
162-
<h3
163-
className="w-full text-lg sm:text-xl"
164-
>
165-
dummy
166-
</h3>
167-
`;
168-
169-
exports[`SectionTitle Preview renders correctly with no label 1`] = `null`;
170-
171-
exports[`SectionTitle Preview renders correctly with visible false 1`] = `null`;
172-
173-
exports[`Skills Preview renders correctly 1`] = `
174-
<div
175-
className="flex flex-wrap justify-start items-center"
176-
>
177-
<h3
178-
className="w-full text-lg sm:text-xl"
179-
>
180-
Languages and Tools:
181-
</h3>
182-
<a
183-
href="https://unity.com/"
184-
rel="noreferrer"
185-
target="_blank"
186-
>
187-
<img
188-
alt="unity"
189-
className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10"
190-
src="https://www.vectorlogo.zone/logos/unity3d/unity3d-icon.svg"
191-
/>
192-
</a>
193-
</div>
194-
`;
195-
196-
exports[`Skills Preview renders correctly with no skills 1`] = `""`;
197-
198-
exports[`Social Preview renders correctly 1`] = `
199-
<div
200-
className="flex justify-start items-end flex-wrap"
201-
>
202-
<h3
203-
className="w-full text-lg sm:text-xl"
204-
>
205-
Connect with me:
206-
</h3>
207-
<a
208-
className="no-underline text-blue-700 m-2"
209-
href="https://codepen.io/dummy"
210-
target="blank"
211-
>
212-
<img
213-
alt="props.username"
214-
className="w-6 h-6"
215-
src="https://cdn.jsdelivr.net/npm/[email protected]/icons/codepen.svg"
216-
/>
217-
</a>
218-
</div>
219-
`;
220-
221-
exports[`SubTitle Preview renders correctly 1`] = `
222-
<h3
223-
className="text-center font-medium"
224-
>
225-
A passionate frontend developer from India
226-
</h3>
227-
`;
228-
229-
exports[`SubTitle Preview renders correctly with no subtitle 1`] = `null`;
230-
231-
exports[`Title Preview renders correctly 1`] = `
232-
<h1
233-
className="text-center text-xl font-bold"
234-
>
235-
Hi 👋, I'm dummy
236-
</h1>
237-
`;
238-
239-
exports[`Title Preview renders correctly with no prefix 1`] = `null`;
240-
241-
exports[`Title Preview renders correctly with no title 1`] = `null`;
242-
243-
exports[`Title Preview renders correctly with no title and prefix 1`] = `null`;
244-
245-
exports[`TopLanguages Preview renders correctly 1`] = `
246-
<div
247-
className="text-center mx-4 mb-4"
248-
>
249-
 
250-
</div>
251-
`;
252-
253-
exports[`TopLanguages Preview renders correctly with show true 1`] = `
254-
<div
255-
className="text-center mx-4 mb-4"
256-
>
257-
<img
258-
alt=""
259-
src="https://github-readme-stats.vercel.app/api/top-langs?username=&show_icons=true&locale=en&layout=compact"
260-
/>
261-
</div>
262-
`;
263-
264-
exports[`TwitterBadgePreview Preview renders correctly 1`] = `null`;
265-
266-
exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `
267-
<div
268-
className="text-left my-2"
269-
>
270-
271-
<a
272-
href="https://twitter.com/\${props.twitter}"
273-
target="blank"
274-
>
275-
<img
276-
alt=""
277-
className="h-4 sm:h-6"
278-
src="https://img.shields.io/twitter/follow/?logo=twitter&style=for-the-badge"
279-
/>
280-
</a>
281-
282-
</div>
283-
`;
284-
285-
exports[`VisitorsBadge Preview renders correctly 1`] = `null`;
286-
287-
exports[`VisitorsBadge Preview renders correctly with show true 1`] = `
288-
<div
289-
className="text-left my-2"
290-
>
291-
292-
<img
293-
alt=""
294-
className="h-4 sm:h-6"
295-
src="https://komarev.com/ghpvc/?username=&label=Profile%20views&color=0e75b6&style=flat"
296-
/>
297-
298-
</div>
299-
`;
300-
301-
exports[`Work Preview renders correctly 1`] = `
302-
<div
303-
className="my-2"
304-
>
305-
🔭 I’m currently working on
306-
<a
307-
className="no-underline text-blue-700"
308-
href="https://dummy.com"
309-
target="blank"
310-
>
311-
readme-generator
312-
</a>
313-
</div>
314-
`;
3+
exports[`DisplaySocial Preview renders correctly 1`] = `ShallowWrapper {}`;
4+
5+
exports[`DisplaySocial Preview renders correctly with no username 1`] = `ShallowWrapper {}`;
6+
7+
exports[`DisplayWork Preview renders correctly 1`] = `ShallowWrapper {}`;
8+
9+
exports[`DisplayWork Preview renders correctly with no link 1`] = `ShallowWrapper {}`;
10+
11+
exports[`DisplayWork Preview renders correctly with no prefix 1`] = `ShallowWrapper {}`;
12+
13+
exports[`DisplayWork Preview renders correctly with no prefix and link 1`] = `ShallowWrapper {}`;
14+
15+
exports[`DisplayWork Preview renders correctly with no prefix, link and project 1`] = `ShallowWrapper {}`;
16+
17+
exports[`DisplayWork Preview renders correctly with no project 1`] = `ShallowWrapper {}`;
18+
19+
exports[`DisplayWork Preview renders correctly with no project and link 1`] = `ShallowWrapper {}`;
20+
21+
exports[`DisplayWork Preview renders correctly with no project and prefix 1`] = `ShallowWrapper {}`;
22+
23+
exports[`GitHubStats Preview renders correctly 1`] = `ShallowWrapper {}`;
24+
25+
exports[`GitHubStats Preview renders correctly 2`] = `ShallowWrapper {}`;
26+
27+
exports[`GithubProfileTrophy Preview renders correctly 1`] = `ShallowWrapper {}`;
28+
29+
exports[`GithubProfileTrophy Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
30+
31+
exports[`Markdown Preview renders correctly 1`] = `ShallowWrapper {}`;
32+
33+
exports[`SectionTitle Preview renders correctly 1`] = `ShallowWrapper {}`;
34+
35+
exports[`SectionTitle Preview renders correctly with no label 1`] = `ShallowWrapper {}`;
36+
37+
exports[`SectionTitle Preview renders correctly with visible false 1`] = `ShallowWrapper {}`;
38+
39+
exports[`Skills Preview renders correctly 1`] = `ShallowWrapper {}`;
40+
41+
exports[`Skills Preview renders correctly with no skills 1`] = `ShallowWrapper {}`;
42+
43+
exports[`Social Preview renders correctly 1`] = `ShallowWrapper {}`;
44+
45+
exports[`SubTitle Preview renders correctly 1`] = `ShallowWrapper {}`;
46+
47+
exports[`SubTitle Preview renders correctly with no subtitle 1`] = `ShallowWrapper {}`;
48+
49+
exports[`Title Preview renders correctly 1`] = `ShallowWrapper {}`;
50+
51+
exports[`Title Preview renders correctly with no prefix 1`] = `ShallowWrapper {}`;
52+
53+
exports[`Title Preview renders correctly with no title 1`] = `ShallowWrapper {}`;
54+
55+
exports[`Title Preview renders correctly with no title and prefix 1`] = `ShallowWrapper {}`;
56+
57+
exports[`TopLanguages Preview renders correctly 1`] = `ShallowWrapper {}`;
58+
59+
exports[`TopLanguages Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
60+
61+
exports[`TwitterBadgePreview Preview renders correctly 1`] = `ShallowWrapper {}`;
62+
63+
exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
64+
65+
exports[`VisitorsBadge Preview renders correctly 1`] = `ShallowWrapper {}`;
66+
67+
exports[`VisitorsBadge Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
68+
69+
exports[`Work Preview renders correctly 1`] = `ShallowWrapper {}`;

0 commit comments

Comments
 (0)