Files
hermes-agent/ui-tui/src/__tests__
xxxigm 8b14080e30 test(tui): pin bundle shape to prevent #31227 from regressing
Vitest regression that builds `dist/entry.js` and checks two
structural invariants required for startup to not hang:

  1. Zero `async "<path>"() { … }` keys inside any `__esm` definition.
     esbuild only emits the `async` form when a module body contains
     top-level await; the `__esm` helper at the top of the bundle
     does not await nested inits, so any async wrapper participating
     in a circular module graph would deadlock the boot
     `await Promise.all([…])` in `src/entry.tsx`.
  2. No `node_modules/ink/build/index.js` or
     `node_modules/ink-text-input/build/index.js` modules. Their
     absence is what makes invariant 1 hold today; if a future commit
     re-introduces the `ink-text-input` re-export, this test catches
     it before the bundle ships.

The test rebuilds the bundle on demand when the source is newer than
`dist/entry.js`, runs in <100ms with no TTY needed, and is hermetic
on a clean checkout.
2026-07-01 02:10:32 -07:00
..