mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
created elementCount component and test
This commit is contained in:
1 parent
2727ff704d
commit
cbdba8ad19
3 files changed
+16
No files matched your search
@@ -0,0 +1,5 @@
|
||||
<script lang="ts">
|
||||
export let count: number = 0;
|
||||
</script>
|
||||
|
||||
<p>{count} <slot /> found</p>
|
||||
@@ -16,3 +16,4 @@ export { default as Collapsible } from './collapsible.svelte';
|
||||
export { default as Avatar } from './avatar.svelte';
|
||||
export { default as SwitchBox } from './switchBox.svelte';
|
||||
export { default as SwitchBoxes } from './switchBoxes.svelte';
|
||||
export { default as ElementCount } from './elementCount.svelte';
|
||||
@@ -0,0 +1,10 @@
|
||||
import '@testing-library/jest-dom';
|
||||
import { render } from '@testing-library/svelte';
|
||||
import { ElementCount } from '../../../src/lib/components';
|
||||
|
||||
test('shows correct count', () => {
|
||||
const { getByText } = render(ElementCount, {
|
||||
count: 1
|
||||
});
|
||||
expect(getByText(/1/i)).toBeInTheDocument();
|
||||
});
|
||||
Reference in new issue
Block a user