Skip to content

Commit

Permalink
test: add missing typings tests to vaadin-avatar-group (#5243)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Jan 6, 2023
1 parent 8e7dbd2 commit 03d5a91
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/avatar-group/test/typings/avatar-group.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import '../../vaadin-avatar-group.js';
import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import type { AvatarGroupI18n, AvatarGroupItem } from '../../vaadin-avatar-group.js';

const assertType = <TExpected>(value: TExpected) => value;

const group = document.createElement('vaadin-avatar-group');

// Properties
assertType<AvatarGroupItem[] | undefined>(group.items);
assertType<number | null | undefined>(group.maxItemsVisible);
assertType<AvatarGroupI18n>(group.i18n);

// Mixins
assertType<ControllerMixinClass>(group);
assertType<ElementMixinClass>(group);
assertType<ResizeMixinClass>(group);
assertType<ThemableMixinClass>(group);

0 comments on commit 03d5a91

Please sign in to comment.