feat: add kotlin commands and skill pack

This commit is contained in:
Affaan Mustafa
2026-03-10 21:25:52 -07:00
parent 82f9f58d28
commit 135eb4c98d
14 changed files with 3900 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---
description: "Kotlin testing extending common rules"
globs: ["**/*.kt", "**/*.kts", "**/build.gradle.kts"]
alwaysApply: false
---
# Kotlin Testing
> This file extends the common testing rule with Kotlin-specific content.
## Framework
Use **Kotest** with spec styles (StringSpec, FunSpec, BehaviorSpec) and **MockK** for mocking.
## Coroutine Testing
Use `runTest` from `kotlinx-coroutines-test`:
```kotlin
test("async operation completes") {
runTest {
val result = service.fetchData()
result.shouldNotBeEmpty()
}
}
```
## Coverage
Use **Kover** for coverage reporting:
```bash
./gradlew koverHtmlReport
./gradlew koverVerify
```
## Reference
See skill: `kotlin-testing` for detailed Kotest patterns, MockK usage, and property-based testing.