1
1
import { faker } from "@faker-js/faker" ;
2
2
3
+ // Ensures test data is the same between runs (especially useful for screenshot comparisons)
4
+ faker . seed ( 42 ) ;
5
+
3
6
function account ( handle : string ) {
4
7
return {
5
8
...user ( ) ,
@@ -21,7 +24,7 @@ function user(handle?: string) {
21
24
const handle_ = handle ? handle : userHandle ( ) ;
22
25
23
26
return {
24
- avatarUrl : faker . image . avatar ( ) ,
27
+ avatarUrl : faker . image . personPortrait ( ) ,
25
28
handle : handle_ . replace ( "@" , "" ) ,
26
29
name : `${ firstName } ${ lastName } ` ,
27
30
userId : faker . string . uuid ( ) ,
@@ -207,28 +210,28 @@ type DiffErrorCulprit = "new" | "old";
207
210
type DiffErrorDetails =
208
211
| { tag : "impossibleError" }
209
212
| {
210
- tag : "constructorAlias" ;
211
- oldOrNewBranch : DiffErrorCulprit ;
212
- typeName : string ;
213
- constructorName1 : string ;
214
- constructorName2 : string ;
215
- }
213
+ tag : "constructorAlias" ;
214
+ oldOrNewBranch : DiffErrorCulprit ;
215
+ typeName : string ;
216
+ constructorName1 : string ;
217
+ constructorName2 : string ;
218
+ }
216
219
| {
217
- tag : "missingConstructorName" ;
218
- oldOrNewBranch : DiffErrorCulprit ;
219
- typeName : string ;
220
- }
220
+ tag : "missingConstructorName" ;
221
+ oldOrNewBranch : DiffErrorCulprit ;
222
+ typeName : string ;
223
+ }
221
224
| {
222
- tag : "nestedDeclAlias" ;
223
- oldOrNewBranch : DiffErrorCulprit ;
224
- constructorName1 : string ;
225
- constructorName2 : string ;
226
- }
225
+ tag : "nestedDeclAlias" ;
226
+ oldOrNewBranch : DiffErrorCulprit ;
227
+ constructorName1 : string ;
228
+ constructorName2 : string ;
229
+ }
227
230
| {
228
- tag : "strayConstructor" ;
229
- oldOrNewBranch : DiffErrorCulprit ;
230
- constructorName : string ;
231
- } ;
231
+ tag : "strayConstructor" ;
232
+ oldOrNewBranch : DiffErrorCulprit ;
233
+ constructorName : string ;
234
+ } ;
232
235
233
236
type ContributionDiffConfig =
234
237
| { tag : "ok" }
0 commit comments