testing-swift
Installation
SKILL.md
Swift Testing Framework
Modern testing with @Test, #expect, and @Suite. Replaces XCTest for new projects.
Critical Constraints
- ❌ DO NOT use
XCTAssertEqualin Swift Testing → ✅ Use#expect(a == b) - ❌ DO NOT use
func testSomething()naming convention → ✅ Use@Test func something() - ❌ DO NOT subclass
XCTestCase→ ✅ Use@Suite structor plain@Testfunctions - ❌ DO NOT use
XCTAssertThrowsError→ ✅ Use#expect(throws:) { try something() } - ❌ DO NOT use
setUp/tearDown→ ✅ Useinit/deiniton@Suitestruct or actor
Basic Test
import Testing