Task Router Skill
Task Router
Generate ViewModel tests with codable round-trip, versioning stability, and multi-locale translation verification.
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
SkillHub CLI
skillhub install foscomputerservices/fosmvvm-viewmodel-test-generatorExaminez la source et la compatibilité, puis suivez les étapes d’installation.
Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.
Generate test files for ViewModels following FOSMVVM testing patterns.
For full architecture context, see FOSMVVMArchitecture.md | OpenClaw reference
ViewModel testing in FOSMVVM verifies three critical aspects:
@LocalizedString properties have values in all supported localesThe LocalizableTestCase protocol provides infrastructure that tests all three in a single call.
@LocalizedSubs substitution behavior| File | Location | Purpose |
|---|---|---|
{Name}ViewModelTests.swift |
Tests/{Target}Tests/Localization/ |
Test suite conforming to LocalizableTestCase |
{Name}ViewModel.yml |
Tests/{Target}Tests/TestYAML/ |
YAML translations for test (if needed) |
For most ViewModels, a single line provides complete coverage:
@Test func dashboardViewModel() throws {
try expectFullViewModelTests(DashboardViewModel.self)
}
This verifies:
This is sufficient for the vast majority of ViewModel tests.
When testing specific formatting behavior (substitutions, compound strings), add locale-specific assertions:
@Test func greetingWithSubstitution() throws {
try expectFu...
Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.
# FOSMVVM ViewModel Test Generator
Generate test files for ViewModels following FOSMVVM testing patterns.
## Conceptual Foundation
> For full architecture context, see [FOSMVVMArchitecture.md](../../docs/FOSMVVMArchitecture.md#testing-support) | [OpenClaw reference]({baseDir}/references/FOSMVVMArchitecture.md)
ViewModel testing in FOSMVVM verifies three critical aspects:
1. **Codable round-trip** - ViewModel encodes and decodes without data loss
2. **Versioning stability** - Structure hasn't changed unexpectedly
3. **Multi-locale translations** - All `@LocalizedString` properties have values in all supported locales
The `LocalizableTestCase` protocol provides infrastructure that tests all three in a single call.
---
## When to Use This Skill
- Creating tests for new ViewModels
- Adding test coverage to existing ViewModels
- Verifying localization completeness across locales
- Testing ViewModels with embedded/nested child ViewModels
- Verifying `@LocalizedSubs` substitution behavior
## What This Skill Generates
| File | Location | Purpose |
|------|----------|---------|
| `{Name}ViewModelTests.swift` | `Tests/{Target}Tests/Localization/` | Test suite conforming to `LocalizableTestCase` |
| `{Name}ViewModel.yml` | `Tests/{Target}Tests/TestYAML/` | YAML translations for test (if needed) |
---
## The Testing Pattern
### Standard Pattern (Most Tests)
For most ViewModels, a single line provides complete coverage:
```swift
@Test func dashboardViewModel() throws {
try expectFullViewModelTests(DashboardViewModel.self)
}
```
This verifies:
- Codable encoding/decoding
- Versioned ViewModel stability
- Translations exist for all locales (en, es by default)
**This is sufficient for the vast majority of ViewModel tests.**
### Extended Pattern (Specific Formatting Verification)
When testing specific formatting behavior (substitutions, compound strings), add locale-specific assertions:
```swift
@Test func greetingWithSubstitution() throws {
try expectFu...Task Router
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.