Skip to main content

write-tests

Add Swift Testing coverage in Tests/Domain, Tests/Invariants, Tests/Integration, or package-local suites. Use when adding behaviour, reproducing a bug, or the user asks for more tests.

Ir para a instalação

Informações da origem

Repositório
hoangsonww/Diffuse-Native-Apps
Última atividade na origem
20 de agosto de 2026 às 04:16
Idioma detectado do SKILL.md
inglês
Estrelas
2
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
write-tests
description
Add Swift Testing coverage in Tests/Domain, Tests/Invariants, Tests/Integration, or package-local suites. Use when adding behaviour, reproducing a bug, or the user asks for more tests.
# Write tests Swift Testing only (`@Test`, `#expect`, `@Suite`). No new XCTest modules. ## Where it goes | Kind | Path | |---|---| | Example-based public API | `Tests/Domain/` | | Seeded invariant ("for any input") | `Tests/Invariants/` | | Golden fixtures, live capture, pipelines | `Tests/Integration/` | | Package-private details | `Packages/<Name>/Tests/` | `DiffuseTestSupport` (`Tests/Support`) has `SnapshotBuilder`, `TestSchema`, `FakeCapabilityFactory`, `SeededGenerator`, `SnapshotSummary.stub`, `TemporaryLibrary`. ## Rules - Prefer fakes over live hardware. Integration live-capture tests are the exception. - Deterministic clocks (`FixedTimeSource`) and ids. No `Date()` or `UUID()` in assertions unless the test is specifically about allocation. - If you change collector schema, run skill `fixtures` and explain the diff. - After writing tests: `swift test --parallel` then `./Scripts/coverage.sh`. ## Shape One behaviour per `@Test` with a sentence name ("Pinned snapshots survive the age window"). Invariants take `arguments:` of seeds and mention the seed in the failure message.
Ver no GitHub