Source Code added
This commit is contained in:
parent
800376eafd
commit
9efa9bc6dd
3912 changed files with 754770 additions and 2 deletions
13
web/tests/helpers.ts
Normal file
13
web/tests/helpers.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import TestWrapper from '$lib/components/TestWrapper.svelte';
|
||||
import { render, type RenderResult } from '@testing-library/svelte';
|
||||
import { type Component } from 'svelte';
|
||||
|
||||
export const renderWithTooltips = <T extends Record<string, unknown>, K extends Component<T>>(
|
||||
component: K,
|
||||
props: T,
|
||||
) => {
|
||||
return render(TestWrapper as Component<{ component: K; componentProps: T }>, {
|
||||
component,
|
||||
componentProps: props,
|
||||
}) as unknown as RenderResult<K>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue