test(runtime-tests): pin JSX children typing under the automatic runtime

The WithChildren shim is only exercised under jsx:"react-jsx", which lives
solely in integration/pty/fixtures/tsconfig.json. Nothing in `ready` ran tsc
against that config (vp check uses jsx:"preserve" and excludes the fixtures;
pty-test only transpiles them), so a regression in the shim — children
silently rejected, or declared props silently widened away — would pass
verification unnoticed.

Add a type-only regression fixture (not a runnable PTY program; not a
*.test.tsx, so vitest never collects it) that pins both directions of the
contract: children are accepted on Box/Text/Static/Transform, and declared
props stay validated via @ts-expect-error (invalid value, wrong type, unknown
prop, and missing required props on Transform/Static).

Wire `tsc -p integration/pty/fixtures/tsconfig.json --noEmit` into `ready` via
a typecheck:fixtures script, run after build (so @vue-tui/runtime resolves
against fresh dist types) and before pty-test, so the react-jsx path is
actually enforced rather than only manually checkable.
This commit is contained in:
Yunfei He
2026-05-28 22:53:18 +08:00
parent fa0708672c
commit 3ef28ca3a1
3 changed files with 44 additions and 1 deletions
+1
View File
@@ -6,6 +6,7 @@
"scripts": {
"test": "vp test",
"pty-test": "vp test run --config vitest.pty.config.ts --passWithNoTests",
"typecheck:fixtures": "tsc -p integration/pty/fixtures/tsconfig.json --noEmit",
"check": "vp check"
},
"devDependencies": {