writing-ios-unit-tests
Installation
SKILL.md
iOS Unit Testing (Swift Testing)
Three core principles ensure reliable unit tests:
- Use Swift Testing framework - Modern
@Testand#expectsyntax for new tests - Keep container alive - Always capture ModelContainer when using SwiftData contexts
- Safe unwrapping patterns - Never force unwrap; use guard with explicit failures
Scope
If input arguments provided:
Scope / file pattern: $ARGUMENTS
else: