Summary
packages/openui-cli has useful isolated helper functions but no test coverage. Adding small unit tests here would improve confidence in CLI behavior without needing to exercise the full scaffolding flow.
Good initial targets
packages/openui-cli/src/lib/detect-package-manager.ts
packages/openui-cli/src/lib/resolve-args.ts
Suggested implementation
Add a Vitest setup for the CLI package and cover cases such as:
detectPackageManager() returns pnpm dlx, yarn dlx, bunx, or npx based on npm_config_user_agent
resolveArgs() returns provided values without prompting
resolveArgs() handles non-interactive missing required args predictably
Acceptance criteria
- The CLI package has a working test script.
- Helper tests are deterministic and do not require real interactive input.
- Existing build/lint scripts continue to work.
Summary
packages/openui-clihas useful isolated helper functions but no test coverage. Adding small unit tests here would improve confidence in CLI behavior without needing to exercise the full scaffolding flow.Good initial targets
packages/openui-cli/src/lib/detect-package-manager.tspackages/openui-cli/src/lib/resolve-args.tsSuggested implementation
Add a Vitest setup for the CLI package and cover cases such as:
detectPackageManager()returnspnpm dlx,yarn dlx,bunx, ornpxbased onnpm_config_user_agentresolveArgs()returns provided values without promptingresolveArgs()handles non-interactive missing required args predictablyAcceptance criteria