mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 10:08:13 +00:00
* [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
31 lines
1.1 KiB
JavaScript
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
|
|
)
|