test: cover four small primitives
RelationshipPill: label render, empty-string handling. OverflowPillDisplay: +N rendering, +0 edge case, aria-hidden marker. TimelineYAxis: max/0 labels, barAreaHeight inline style, zero handling. TranscriptionSection: heading + textarea, initial-value hydration, empty default. 11 tests across four small primitives. Refs #496. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { describe, it, expect, afterEach } from 'vitest';
|
||||
import { cleanup, render } from 'vitest-browser-svelte';
|
||||
import { page } from 'vitest/browser';
|
||||
import RelationshipPill from './RelationshipPill.svelte';
|
||||
|
||||
afterEach(cleanup);
|
||||
|
||||
describe('RelationshipPill', () => {
|
||||
it('renders the supplied label', async () => {
|
||||
render(RelationshipPill, { props: { label: 'Vater' } });
|
||||
|
||||
await expect.element(page.getByText('Vater')).toBeVisible();
|
||||
});
|
||||
|
||||
it('renders an empty string label without crashing', async () => {
|
||||
render(RelationshipPill, { props: { label: '' } });
|
||||
|
||||
const span = document.querySelector('span');
|
||||
expect(span).not.toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user