Rechercher

PythonReactSEOPDF
OpenClaw

fosmvvm-viewmodel-test-generator

Generate ViewModel tests with codable round-trip, versioning stability, and multi-locale translation verification.

foscomputerservices0 installations selon la source☆ 0 Étoiles du dépôt

Installation

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-generator

Examinez 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.

Voir la source ↗Guides

Instructions

FOSMVVM ViewModel Test Generator

Generate test files for ViewModels following FOSMVVM testing patterns.

Conceptual Foundation

For full architecture context, see FOSMVVMArchitecture.md | OpenClaw reference

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:

@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:

@Test func greetingWithSubstitution() throws {
    try expectFu...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/foscomputerservices/fosmvvm-viewmodel-test-generator
Version
—
Commit
2e0e4adccf2ec77d6d5fda02d4c97a06cdb652e7
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
# 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...

Skills associés

OpenClaw

x402hub

capncoconut

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,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.