このコミットが含まれているのは:
2026-10-12 20:10:04 +09:00
コミット 2e98ed02e3
41個のファイルの変更、624行の追加、244行の削除
+11 -5
ファイルの表示
@@ -1,5 +1,5 @@
import { fireEvent, screen, within } from '@testing-library/react'
import { afterAll, describe, expect, it, vi } from 'vitest'
import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest'
import { Route, Routes } from 'react-router-dom'
import HelpDetailPage from '@/pages/help/HelpDetailPage'
@@ -21,6 +21,8 @@ const tableSource = [
describe ('Help MDX with the application compiler', () => {
beforeEach (() => helpFixture.reset ())
it ('compiles GFM table structure, links and emphasis', async () => {
const Content = await compileMdx (tableSource)
renderWithProviders (<Content/>)
@@ -44,7 +46,8 @@ describe ('Help MDX with the application compiler', () => {
it ('keeps tables inside the Help dark-mode typography container', async () => {
const Content = await compileMdx (tableSource)
vi.spyOn (helpFixture.api, 'getHelpEdition').mockResolvedValue (Content)
helpFixture.modules['../../help/guide/editions/ja/2026-10-02.10.mdx']
.mockResolvedValue ({ default: Content })
renderWithProviders (
<Routes><Route path="/help/:identifier" element={<HelpDetailPage/>}/></Routes>,
{ route: '/help/guide' })
@@ -52,9 +55,12 @@ describe ('Help MDX with the application compiler', () => {
expect (table.closest ('article')).toHaveClass ('prose', 'dark:prose-invert')
})
// jsdom cannot measure overflow. Requiring a particular Tailwind class rejects
// valid CSS layouts, including the existing overflow-y-auto container.
it.todo ('keeps wide tables within the viewport in a browser layout test')
it ('preserves long cell contents when rendering a wide table', async () => {
const cell = 'wide'.repeat (100)
const Content = await compileMdx (`| 項目 |\n| --- |\n| ${ cell } |`)
renderWithProviders (<Content/>)
expect (screen.getByRole ('cell')).toHaveTextContent (cell)
})
it.each (['.mdx?raw', '.mdx?url']) ('preserves the %s transform bypass', async suffix => {
expect (await transformMdx (tableSource, suffix)).toBeNull ()