fix(types): improve with strict mode (#1041)

This commit is contained in:
Benjamin Canac
2023-11-30 12:02:37 +01:00
committed by GitHub
parent 464ff0b703
commit 4a9b66aeb3
68 changed files with 266 additions and 242 deletions

View File

@@ -13,6 +13,7 @@ describe('Button', () => {
[ 'black solid', { props: { color: 'black', variant: 'solid' } } ],
[ 'rounded full', { props: { ui: { rounded: 'rounded-full' } } } ],
[ '<UButton icon="i-heroicons-pencil-square" size="sm" color="primary" square variant="solid" />' ]
// @ts-ignore
])('renders %s correctly', async (nameOrHtml: string, options: ButtonOptions) => {
if (options !== undefined) {
options.slots = options.slots || { default: () => 'label' }

View File

@@ -7,6 +7,7 @@ describe('Skeleton', () => {
it.each([
[ 'basic case', { } ],
[ '<USkeleton class="h-12 w-12" :ui="{ rounded: \'rounded-full\' }" />' ]
// @ts-ignore
])('renders %s correctly', async (nameOrHtml: string, options: TypeOf<typeof Skeleton.props>) => {
const html = await ComponentRender(nameOrHtml, options, Skeleton)
expect(html).toMatchSnapshot()