ITADN

Missing test coverage for CLI --theme flag

#1224ClosedBOXER78 创建于 2025-12-04
seems-ai-generated
B
BOXER78commented
### Clear and concise description of the problem The shiki CLI supports a --theme flag to specify the theme for highlighting, but there is currently no test case in packages/cli/test/cli.test.ts to verify this functionality. This leaves a gap in test coverage where regressions in the --theme flag logic might go unnoticed. ### Suggested solution Add a new test case to packages/cli/test/cli.test.ts that runs the CLI with the --theme flag (e.g., using min-light) and asserts that the output HTML contains the correct class and style attributes corresponding to that theme. ### Alternative _No response_ ### Additional context _No response_ ### Validations - [x] Follow our [Code of Conduct](https://github.com/shikijs/shiki/blob/main/CODE_OF_CONDUCT.md) - [x] Read the [Contributing Guide](https://github.com/shikijs/shiki/blob/main/CONTRIBUTING.md). - [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
关闭于 2025-12-05 1 条评论