16 lines
640 B
TypeScript
16 lines
640 B
TypeScript
import { render, screen } from '@testing-library/svelte';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
import GrowthTeaser from './GrowthTeaser.svelte';
|
|
|
|
describe('GrowthTeaser', () => {
|
|
it('links to the growth analyst without starting a generation request', () => {
|
|
render(GrowthTeaser, { href: '/growth?terminal=terminal-1' });
|
|
|
|
const link = screen.getByRole('link', { name: /دیدن تحلیل ۹۰ روزه/ });
|
|
expect(link.getAttribute('href')).toBe('/growth?terminal=terminal-1');
|
|
expect(link.className).toContain('bg-primary');
|
|
expect(screen.getByText('تحلیلگر رشد')).not.toBeNull();
|
|
});
|
|
});
|