← Back to PRs

#21027: fix(tests): resolve TypeScript type errors in CLI test files

by kittipond2365 open 2026-02-19 15:31 View on GitHub →
cli size: XS
- browser-cli-inspect.test.ts: Cast args to string[] for includes() call to fix TS2345 error when TypeScript infers narrow tuple types - cron-cli.test.ts: Add missing 'schedule' property to CronUpdatePatch type to fix TS2339 error when accessing patch.schedule in tests Fixes CI failures in run #22188147945 <!-- greptile_comment --> <h3>Greptile Summary</h3> Resolves TypeScript type errors in two CLI test files: - **`browser-cli-inspect.test.ts`**: Casts `args` to `string[]` to fix TS2345 error. TypeScript inferred `args` as a narrow tuple type from `it.each` test cases, which doesn't have the `includes()` method. The cast resolves this. - **`cron-cli.test.ts`**: Adds missing `schedule` property to `CronUpdatePatch` type definition to fix TS2339 error. The property is accessed in tests at lines 485-486 and 494 but was missing from the type definition. Both fixes are straightforward type corrections that align the type definitions with actual runtime usage in the tests. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - Score reflects simple, well-scoped TypeScript type fixes with no runtime behavior changes. Both changes address real type errors where the type definitions didn't match actual usage in tests. - No files require special attention <sub>Last reviewed commit: 694f1da</sub> <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs