chore: add vitest/globals types, remove redundant vitest imports, fix pre-existing lint issues

This commit is contained in:
Ilia Mashkov
2026-04-24 08:38:00 +03:00
parent f0fccd55f1
commit d89dc2ee70
42 changed files with 116 additions and 130 deletions
@@ -1,4 +1,3 @@
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { DetailedProjectCard } from './DetailedProjectCard';
@@ -78,13 +77,12 @@ describe('DetailedProjectCard', () => {
it('renders image when imageUrl is provided', () => {
render(<DetailedProjectCard {...DEFAULT_PROPS} imageUrl="/detail.jpg" />);
const img = screen.getByRole('img');
expect(img).toHaveAttribute('src', '/detail.jpg');
expect(screen.getByRole('img')).toBeInTheDocument();
});
it('image wrapper has aspect-video and brutal-border when imageUrl is provided', () => {
const { container } = render(<DetailedProjectCard {...DEFAULT_PROPS} imageUrl="/detail.jpg" />);
const imgWrapper = container.querySelector('img')!.parentElement;
const imgWrapper = container.querySelector('img')?.parentElement;
expect(imgWrapper).toHaveClass('aspect-video', 'brutal-border');
});
});