vitest-image-snapshot 0.6.36 → 0.6.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/test/fixtures/failing-snapshot/__image_actual__/red-square.png +0 -0
- package/src/test/fixtures/failing-snapshot/__image_diff_report__/index.html +194 -0
- package/src/test/fixtures/failing-snapshot/__image_diff_report__/packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_actual__/red-square.png +0 -0
- package/src/test/fixtures/failing-snapshot/__image_diff_report__/packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_diffs__/red-square.png +0 -0
- package/src/test/fixtures/failing-snapshot/__image_diff_report__/packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_snapshots__/red-square.png +0 -0
- package/src/test/fixtures/failing-snapshot/__image_diffs__/red-square.png +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Image Snapshot Failures - 1 failed</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
9
|
+
body {
|
|
10
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
11
|
+
padding: 20px;
|
|
12
|
+
background: #f5f5f5;
|
|
13
|
+
}
|
|
14
|
+
header {
|
|
15
|
+
background: white;
|
|
16
|
+
padding: 20px;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
margin-bottom: 20px;
|
|
19
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
20
|
+
}
|
|
21
|
+
h1 {
|
|
22
|
+
color: #d73027;
|
|
23
|
+
margin-bottom: 10px;
|
|
24
|
+
}
|
|
25
|
+
.meta {
|
|
26
|
+
color: #666;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
}
|
|
29
|
+
.update-hint {
|
|
30
|
+
background: #fff3cd;
|
|
31
|
+
border: 1px solid #ffc107;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
padding: 12px;
|
|
34
|
+
margin: 15px 0;
|
|
35
|
+
}
|
|
36
|
+
.update-hint code {
|
|
37
|
+
background: #f8f9fa;
|
|
38
|
+
padding: 2px 6px;
|
|
39
|
+
border-radius: 3px;
|
|
40
|
+
font-family: 'Monaco', 'Courier New', monospace;
|
|
41
|
+
}
|
|
42
|
+
table {
|
|
43
|
+
width: 100%;
|
|
44
|
+
border-collapse: collapse;
|
|
45
|
+
background: white;
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
49
|
+
}
|
|
50
|
+
th, td {
|
|
51
|
+
padding: 15px;
|
|
52
|
+
text-align: left;
|
|
53
|
+
border-bottom: 1px solid #e0e0e0;
|
|
54
|
+
}
|
|
55
|
+
th {
|
|
56
|
+
background: #f8f9fa;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
color: #333;
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
61
|
+
tr:last-child td {
|
|
62
|
+
border-bottom: none;
|
|
63
|
+
}
|
|
64
|
+
tr:hover {
|
|
65
|
+
background: #fafafa;
|
|
66
|
+
}
|
|
67
|
+
.test-name {
|
|
68
|
+
min-width: 200px;
|
|
69
|
+
vertical-align: top;
|
|
70
|
+
}
|
|
71
|
+
.test-name strong {
|
|
72
|
+
color: #333;
|
|
73
|
+
}
|
|
74
|
+
.test-name code {
|
|
75
|
+
color: #666;
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
background: #f5f5f5;
|
|
78
|
+
padding: 2px 6px;
|
|
79
|
+
border-radius: 3px;
|
|
80
|
+
}
|
|
81
|
+
.image-cell {
|
|
82
|
+
text-align: center;
|
|
83
|
+
vertical-align: top;
|
|
84
|
+
width: 25%;
|
|
85
|
+
}
|
|
86
|
+
.image-cell a {
|
|
87
|
+
display: block;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
}
|
|
90
|
+
.image-cell img {
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
height: auto;
|
|
93
|
+
max-height: 300px;
|
|
94
|
+
border: 1px solid #ddd;
|
|
95
|
+
border-radius: 4px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
transition: transform 0.2s;
|
|
98
|
+
}
|
|
99
|
+
.image-cell img:hover {
|
|
100
|
+
transform: scale(1.02);
|
|
101
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
102
|
+
}
|
|
103
|
+
.label {
|
|
104
|
+
margin-top: 8px;
|
|
105
|
+
font-size: 12px;
|
|
106
|
+
color: #666;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
.no-diff {
|
|
110
|
+
color: #999;
|
|
111
|
+
font-size: 13px;
|
|
112
|
+
font-style: italic;
|
|
113
|
+
padding: 20px;
|
|
114
|
+
text-align: center;
|
|
115
|
+
}
|
|
116
|
+
.stats {
|
|
117
|
+
text-align: center;
|
|
118
|
+
color: #d73027;
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
vertical-align: top;
|
|
121
|
+
}
|
|
122
|
+
.stats div {
|
|
123
|
+
margin: 5px 0;
|
|
124
|
+
}
|
|
125
|
+
footer {
|
|
126
|
+
margin-top: 20px;
|
|
127
|
+
text-align: center;
|
|
128
|
+
color: #999;
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
132
|
+
</head>
|
|
133
|
+
<body>
|
|
134
|
+
<header>
|
|
135
|
+
<h1>🔴 Image Snapshot Failures</h1>
|
|
136
|
+
<div class="meta">
|
|
137
|
+
<strong>1</strong> test failed •
|
|
138
|
+
Generated: 11/13/2025, 7:35:50 PM
|
|
139
|
+
</div>
|
|
140
|
+
<div class="update-hint">
|
|
141
|
+
💡 <strong>To update snapshots:</strong> Run <code>pnpm test -- -u</code> or <code>vitest -u</code>
|
|
142
|
+
</div>
|
|
143
|
+
</header>
|
|
144
|
+
|
|
145
|
+
<table>
|
|
146
|
+
<thead>
|
|
147
|
+
<tr>
|
|
148
|
+
<th>Test</th>
|
|
149
|
+
<th>Expected</th>
|
|
150
|
+
<th>Actual</th>
|
|
151
|
+
<th>Diff</th>
|
|
152
|
+
<th>Mismatch</th>
|
|
153
|
+
</tr>
|
|
154
|
+
</thead>
|
|
155
|
+
<tbody>
|
|
156
|
+
|
|
157
|
+
<tr>
|
|
158
|
+
<td class="test-name">
|
|
159
|
+
<strong>red vs blue snapshot</strong><br>
|
|
160
|
+
<code>red-square</code>
|
|
161
|
+
</td>
|
|
162
|
+
<td class="image-cell">
|
|
163
|
+
<a href="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_snapshots__/red-square.png" target="_blank">
|
|
164
|
+
<img src="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_snapshots__/red-square.png" alt="Expected" />
|
|
165
|
+
</a>
|
|
166
|
+
<div class="label">Expected</div>
|
|
167
|
+
</td>
|
|
168
|
+
<td class="image-cell">
|
|
169
|
+
<a href="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_actual__/red-square.png" target="_blank">
|
|
170
|
+
<img src="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_actual__/red-square.png" alt="Actual" />
|
|
171
|
+
</a>
|
|
172
|
+
<div class="label">Actual</div>
|
|
173
|
+
</td>
|
|
174
|
+
<td class="image-cell">
|
|
175
|
+
<a href="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_diffs__/red-square.png" target="_blank">
|
|
176
|
+
<img src="packages/vitest-image-snapshot/src/test/fixtures/failing-snapshot/__image_diffs__/red-square.png" alt="Diff" />
|
|
177
|
+
</a>
|
|
178
|
+
<div class="label">Diff</div>
|
|
179
|
+
</td>
|
|
180
|
+
<td class="stats">
|
|
181
|
+
<div><strong>4</strong> pixels</div>
|
|
182
|
+
<div><strong>100.00%</strong></div>
|
|
183
|
+
</td>
|
|
184
|
+
</tr>
|
|
185
|
+
|
|
186
|
+
</tbody>
|
|
187
|
+
</table>
|
|
188
|
+
|
|
189
|
+
<footer>
|
|
190
|
+
Click images to view full size •
|
|
191
|
+
Diff images highlight mismatched pixels in yellow/red
|
|
192
|
+
</footer>
|
|
193
|
+
</body>
|
|
194
|
+
</html>
|
|
Binary file
|
|
Binary file
|