Repository navigation
test(core): add unit tests for shellQuote utility - #4161
Conversation
Signed-off-by: Atulya Singh <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a Vitest test suite for the ChangesshellQuote Test Suite
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
|
✨ Thanks for submitting this detailed PR about adding unit tests for the shellQuote utility. This proposes a way to improve test coverage for the shellQuote function in the core library by adding unit tests for various scenarios. |
Signed-off-by: Carlos Villela <[email protected]>
Summary
Adds unit tests for the
shellQuoteutility insrc/lib/core/shell-quote.ts. The function had no test coverage despite being used to safely interpolate values into bash-cstrings.Changes
src/lib/core/shell-quote.test.tscovering: simple strings, plain word wrapping, embedded single-quote escaping, empty string, special shell characters ($), and strings consisting entirely of single quotes.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Atulya Singh [email protected]
Summary by CodeRabbit