Skip to content

Commit aff853c

Browse files
committed
Fix tests
1 parent a065d92 commit aff853c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/slot.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ describe('Slot typing', () => {
258258

259259
expect(getTypeName(code)).toBe(
260260
'(Banner & {_component: "banner@1";})'
261-
+ ' | (HorizontalBanner & {_type: \'horizontal-banner\';} & {_component: "hybrid-banner@1";})'
262-
+ ' | (VerticalBanner & {_type: \'vertical-banner\';} & {_component: "hybrid-banner@1";})',
261+
+ ' | (HorizontalBanner & {_type: "horizontal-banner";} & {_component: "hybrid-banner@1";})'
262+
+ ' | (VerticalBanner & {...;} & {_component: "hybrid-banner@1";})',
263263
);
264264
});
265265

@@ -291,7 +291,7 @@ describe('Slot typing', () => {
291291

292292
expect(() => compileCode(code)).not.toThrow();
293293

294-
expect(getTypeName(code)).toBe('HomeBanner & {_component: \'banner@1\' | null;}');
294+
expect(getTypeName(code)).toBe('HomeBanner & {_component: "banner@1" | null;}');
295295
});
296296

297297
it('should export a SlotContent type that resolves to multiple slot contents', () => {
@@ -348,8 +348,8 @@ describe('Slot typing', () => {
348348

349349
expect(getTypeName(code)).toBe(
350350
'(Banner & {_component: "banner@1" | null;})'
351-
+ ' | (HorizontalBanner & {_type: \'horizontal-banner\';} & {_component: "hybrid-banner@1" | null;})'
352-
+ ' | (VerticalBanner & {...;} & {_component: "hybrid-banner@1" | null;})',
351+
+ ' | (HorizontalBanner & {_type: "horizontal-banner";} & {_component: "hybrid-banner@1" | null;})'
352+
+ ' | (VerticalBanner & ... 1 more ... & {_component: "hybrid-banner@1" | null;})',
353353
);
354354
});
355355

0 commit comments

Comments
 (0)