Files
orca/config/scripts/mobile-web-app-text-input-discovery.test.mjs
T
Neil 6607c54984 perf(ci): cut redundant tests and reuse expensive setup (#28669)
* perf(ci): reduce test overhead and reuse expensive build work

* test(ci): keep worker startup outside failure-case deadlines

* test: isolate push fixture advisory locks

* test(ci): preserve fixed drain retry allowance

* Align CI contracts with current triggers and guide content

* Stabilize consolidated reveal scenarios and retain behavioral CI contracts

* Fix upstream lint blockers while retaining behavior and assertions

* Classify global Jira preferences in the WSL migration inventory

* Align Jira test fixtures with startup and build safety checks

* Include package-test routing dependency in CI checkouts and fixtures

* Keep native stream classes intact in transcript dependency tests
2026-10-14 16:14:27 -07:00

23 lines
1.0 KiB
JavaScript

import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { expect, it } from 'vitest'
import { modulesDeclaringTextInput } from './mobile-web-app-text-input-font-size-seam.mjs'
it('discovers input modules and ignores tests and non-JSX mentions', () => {
const scratch = mkdtempSync(join(tmpdir(), 'orca-text-input-discovery-'))
try {
mkdirSync(join(scratch, 'src/browser'), { recursive: true })
for (const [name, source] of Object.entries({
'Planted.tsx': 'export const P = () => <TextInput style={styles.input} />',
'Planted.test.tsx': 'it("x", () => <TextInput />)',
'mentions-only.ts': "import { TextInput } from 'react-native' // TextInput, named twice"
})) {
writeFileSync(join(scratch, 'src/browser', name), source)
}
expect(modulesDeclaringTextInput(scratch, 'src/browser')).toEqual(['src/browser/Planted.tsx'])
} finally {
rmSync(scratch, { recursive: true, force: true })
}
})