test: port Ink text tests (13 passing, 4 skipped)

Adds 17 text tests from Ink: color (standard/hex/rgb/ansi256),
background color, dim, bold, inversion, reactive remeasure, and
edge cases. 4 tests skipped due to null-children yoga crash and
constructor text lookup bug.

Also fixes lastFrame() treating empty-string frames as undefined
(Codex review feedback) and adds strip-ansi dev dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yunfei He
2026-05-25 21:39:10 +08:00
parent 22ecbe0f80
commit 0209d5b5aa
4 changed files with 184 additions and 3 deletions
+7 -1
View File
@@ -15,8 +15,11 @@ catalogs:
chalk:
specifier: ^5.6.2
version: 5.6.2
strip-ansi:
specifier: ^7.2.0
version: 7.2.0
vite-plus:
specifier: latest
specifier: ^0.1.22
version: 0.1.22
overrides:
@@ -192,6 +195,9 @@ importers:
chalk:
specifier: 'catalog:'
version: 5.6.2
strip-ansi:
specifier: 'catalog:'
version: 7.2.0
typescript:
specifier: ^6.0.3
version: 6.0.3