Files
orca/config/scripts/mobile-web-app-session-webview-consumers.test.mjs
T
Neil 13a75d3939 [CI] Reduce redundant test work and import existing helpers directly (#28365)
* [CI] Reduce redundant test work and import existing helpers directly

* [CI] Preserve provider guards and pin the mobile browser test core

* [CI] Fix CI test setup and verify retained contracts

* [CI] Compare native media chunks without boxed byte arrays

* [CI] Detect shifted native media reads with position-sensitive bytes
2026-10-13 20:25:00 -07:00

31 lines
1.1 KiB
JavaScript

/** Session routes resolve the named components to their web implementations. */
import { describe, expect, it } from 'vitest'
import { mobileWebAppRouteClosure } from './build-mobile-web-app-bundle.mjs'
import { mobileWebAppDependenciesPresent } from './mobile-web-app-bundle-dependencies.mjs'
const describeClosure = mobileWebAppDependenciesPresent() ? describe : describe.skip
const SESSION = 'app/h/[hostId]/session/[worktreeId].tsx'
/** Web implementations expected in the session route closure. */
const ANSWERED = [
'src/components/MobileRichMarkdownEditor.web.tsx',
'src/components/MobileHtmlPreview.web.tsx',
'src/components/pr-sidebar/MermaidDiagram.web.tsx',
'src/terminal/TerminalWebView.web.tsx'
]
describeClosure(
'the session route web component closure',
() => {
it('resolves all four web components and excludes their native files', async () => {
const closure = await mobileWebAppRouteClosure(SESSION)
for (const file of ANSWERED) {
expect(closure.local, file).toContain(file)
expect(closure.local, file).not.toContain(file.replace('.web.tsx', '.tsx'))
}
})
},
240_000
)