Skip to content

Commit c1cf473

Browse files
committed
corrected union tests
1 parent 7365a0d commit c1cf473

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/analysis/buildTypeWeights.test.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,23 +478,32 @@ describe('Test buildTypeWeightsFromSchema function', () => {
478478
weight: 1,
479479
fields: {
480480
name: { weight: 0 },
481-
search: { resolveTo: 'searchresult' },
481+
search: {
482+
resolveTo: 'searchresult',
483+
weight: expect.any(Function),
484+
},
482485
},
483486
},
484487
human: {
485488
weight: 1,
486489
fields: {
487490
name: { weight: 0 },
488491
homePlanet: { weight: 0 },
489-
search: { resolveTo: 'searchresult' },
492+
search: {
493+
resolveTo: 'searchresult',
494+
weight: expect.any(Function),
495+
},
490496
},
491497
},
492498
droid: {
493499
weight: 1,
494500
fields: {
495501
name: { weight: 0 },
496502
primaryFunction: { weight: 0 },
497-
search: { resolveTo: 'searchresult' },
503+
search: {
504+
resolveTo: 'searchresult',
505+
weight: expect.any(Function),
506+
},
498507
},
499508
},
500509
});

0 commit comments

Comments
 (0)