このコミットが含まれているのは:
2026-05-13 21:49:40 +09:00
コミット 78143363c9
10個のファイルの変更224行の追加318行の削除
-13
ファイルの表示
@@ -1,13 +0,0 @@
import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import MenuSeparator from '@/components/MenuSeparator'
describe ('MenuSeparator', () => {
it ('renders desktop and mobile separators', () => {
render (<MenuSeparator/>)
expect (screen.getByText ('|')).toHaveClass ('md:inline')
expect (document.querySelector ('hr')).toHaveClass ('md:hidden')
})
})
+11 -1
ファイルの表示
@@ -1,11 +1,21 @@
import { fireEvent, screen } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import PostList from '@/components/PostList'
import { buildPost } from '@/test/factories'
import { renderWithProviders } from '@/test/render'
const prefetchers = vi.hoisted (() => ({
prefetchForURL: vi.fn (),
}))
vi.mock ('@/lib/prefetchers', () => prefetchers)
describe ('PostList', () => {
beforeEach (() => {
prefetchers.prefetchForURL.mockResolvedValue (undefined)
})
it ('renders post thumbnails as links to post details', () => {
renderWithProviders (
<PostList posts={[
+4 -6
ファイルの表示
@@ -11,15 +11,13 @@ describe ('common typography and form components', () => {
it ('renders Form children inside the standard container', () => {
render (<Form><span>Content</span></Form>)
expect (screen.getByText ('Content').parentElement).toHaveClass ('max-w-xl')
expect (screen.getByText ('Content')).toBeInTheDocument ()
})
it ('renders SectionTitle as an h2 and merges custom classes', () => {
render (<SectionTitle className="custom">Section</SectionTitle>)
it ('renders SectionTitle as an h2', () => {
render (<SectionTitle>Section</SectionTitle>)
const heading = screen.getByRole ('heading', { level: 2, name: 'Section' })
expect (heading).toHaveClass ('text-xl')
expect (heading).toHaveClass ('custom')
expect (screen.getByRole ('heading', { level: 2, name: 'Section' })).toBeInTheDocument ()
})
it ('renders SubsectionTitle as an h3', () => {