> android-testing
Standards for Unit Tests, UI Tests (Compose), and Hilt Integration. Use when writing unit tests, Compose UI tests, or Hilt test modules in Android. (triggers: **/*Test.kt, **/*Rule.kt, @Test, runTest, composeTestRule)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/android-testing?format=md"Android Testing Standards
Priority: P0
Implementation Guidelines
Unit Tests
- Scope: ViewModels, Usecases, Repositories, Utils.
- Coroutines: Use
runTest(kotlinx-coroutines-test). UseMainDispatcherRuleto mock Main dispatcher. - Mocking: Use MockK.
UI Integration Tests (Instrumentation)
- Scope: Composable Screens, Navigation flows.
- Rules: Use
createAndroidComposeRule+ Hilt (HiltAndroidRule). - Isolation: Fake repositories in DI modules (
@TestInstallIn).
Anti-Patterns
- Real Network:
**No Real APIs**: Always mock network calls. - Flaky Delays:
**No Thread.sleep**: Use IdlingResource or 'waitUntil'.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)