affaan-m/everything-claude-code/fsharp-testing
Claude Code and agent skill by affaan-m/everything-claude-code
- community
Checking that the SKILL.md file is still in the repository.
F# testing patterns with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization best practices. Use when writing F# tests with xUnit, FsUnit, Unquote, or FsCheck.
Install
npx vskill@latest install affaan-m/everything-claude-code/fsharp-testingSKILL.md
The same SKILL.md was published earlier as affaan-m/everything-claude-code/fsharp-testing.
F# Testing Patterns
Comprehensive testing patterns for F# applications using xUnit, FsUnit, Unquote, FsCheck, and modern .NET testing practices.
When to Activate
- Writing new tests for F# code
- Reviewing test quality and coverage
- Setting up test infrastructure for F# projects
- Debugging flaky or slow tests
Test Framework Stack
| Tool | Purpose | |
|---|---|---|
| xUnit | Test framework (standard .NET ecosystem choice) | |
| FsUnit.xUnit | F#-friendly assertion syntax for xUnit | |
| Unquote | Assertion library using F# quotations for clear failure messages | |
| FsCheck.xUnit | Property-based testing integrated with xUnit | |
| NSubstitute | Mocking .NET dependencies | |
| Testcontainers | Real infrastructure in integration tests | |
| WebApplicationFactory | ASP.NET Core integration tests |
Unit Tests with xUnit + FsUnit
Basic Test Structure
Assertions with Unquote
Unquote uses F# quotations so failure messages show the full expression that failed, not just "expected X got Y".
Async Tests
Parameterized Tests with Theory
Property-Based Testing with FsCheck
Using FsCheck.xUnit
Custom Generators
Mocking Dependencies
Function Stubs (Preferred)
NSubstitute for .NET Interfaces
ASP.NET Core Integration Tests
Test Organization
Common Anti-Patterns
| Anti-Pattern | Fix | |
|---|---|---|
| Testing implementation details | Test behavior and outcomes | |
| Mutable shared test state | Fresh state per test | |
Thread.Sleep in async tests | Use Task.Delay with timeout, or polling helpers | |
Asserting on sprintf output | Assert on typed values and pattern matches | |
Ignoring CancellationToken | Always pass and verify cancellation | |
| Skipping property-based tests | Use FsCheck for any function with clear invariants |
Related Skills
dotnet-patterns- Idiomatic .NET patterns, dependency injection, and architecturecsharp-testing- C# testing patterns (shared infrastructure like WebApplicationFactory and Testcontainers applies to F# too)
Running Tests
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/fsharp-testing/SKILL.md
Popularity
- Repository stars
- 185,175
- Repository forks
- 28,642
- Repository npm downloads, 7 days
- 2,034
- 7-day trend score
- 78
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 17 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/affaan-m/everything-claude-code/fsharp-testing)