このコミットが含まれているのは:
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', () => {
+3 -2
ファイルの表示
@@ -39,7 +39,8 @@ describe ('WikiDiffPage', () => {
)
})
expect (screen.getByText ('差分対象')).toBeInTheDocument ()
expect (screen.getByText ('added line')).toHaveClass ('bg-green-200')
expect (screen.getByText ('removed line')).toHaveClass ('bg-red-200')
expect (screen.getByText ('same')).toBeInTheDocument ()
expect (screen.getByText ('added line')).toBeInTheDocument ()
expect (screen.getByText ('removed line')).toBeInTheDocument ()
})
})
+1
ファイルの表示
@@ -1,6 +1,7 @@
import { describe, it } from 'vitest'
describe ('pending high-level browser coverage', () => {
it.todo ('adds MSW-backed API boundary tests in a follow-up issue')
it.todo ('covers TheatreDetailPage with timer polling, comment posting, and next-post updates')
it.todo ('covers NicoTagListPage linking and pagination against realistic API payloads')
it.todo ('covers TagDetailSidebar drag/drop parent-child editing with pointer-event fidelity')
+3 -1
ファイルの表示
@@ -1,9 +1,11 @@
import '@testing-library/jest-dom/vitest'
import { cleanup } from '@testing-library/react'
import { afterEach } from 'vitest'
import { afterEach, vi } from 'vitest'
afterEach (() => {
cleanup ()
localStorage.clear ()
vi.restoreAllMocks ()
})
Element.prototype.scrollIntoView = function () {