Skip to content

Commit 7fb53c6

Browse files
committed
fix: update Readme.md and Sprout.fsproj for minor adjustments
1 parent 9313731 commit 7fb53c6

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

Readme.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
1+
<p align="center">
12
<img src="logo.png" height="128" width="128" />
3+
</p>
24

35
# Sprout: BDD Testing for F#
46

7+
> *Write your tests like your thoughts. Sprout is a lightweight F# test DSL with a clean, composable structure built on computation expressions.*
8+
59
[![Build](https://github.com/dlidstrom/Sprout/actions/workflows/build.yml/badge.svg)](https://github.com/dlidstrom/Sprout/actions/workflows/build.yml)
610

7-
## Usage
11+
## ✅ Features
12+
13+
* Minimalist & expressive BDD-style syntax
14+
* Nestable `describe` blocks
15+
* Computation expressions for `it`, `beforeEach`, `afterEach`
16+
* Pending tests supported by omission
17+
* Logging for improved tracing
18+
* Pluggable reporters (console, silent, TAP, JSON)
19+
* Built for F# — no extra syntax or matchers
20+
21+
---
22+
23+
### 🚀 Getting Started
24+
25+
```bash
26+
dotnet add package Sprout
27+
```
28+
29+
---
30+
31+
### 🧪 Example Test
832

933
```fsharp
1034
open Sprout
@@ -73,3 +97,47 @@ let suite = describe "A test suite" {
7397
Output:
7498

7599
![output](out.png)
100+
101+
---
102+
103+
### 🧩 Extending Sprout
104+
105+
You can plug in your own reporter:
106+
107+
```fsharp
108+
type MyCustomReporter() =
109+
interface ITestReporter with
110+
member _.BeginSuite(name, path) = ...
111+
member _.ReportResult(result, path) = ...
112+
member _.EndSuite(name, path) = ...
113+
member _.Info(message, path) = ...
114+
member _.Debug(message, path) = ...
115+
member _.End(testResults) = ...
116+
```
117+
118+
---
119+
120+
### 🎯 Philosophy
121+
122+
Sprout is built on:
123+
124+
* **F# idioms** — computation expressions
125+
* **Extensibility** — pluggable reporters and hooks
126+
127+
### Blocks
128+
129+
| Name | Usage | Supported Expressions |
130+
|-|-|-|
131+
`describe` | Declarative | `it`, `beforeEach`, `afterEach`, `it`, `Info`, `Debug` |
132+
| `it` | Imperative | Any F# expressions, but typically exception-based assertions |
133+
134+
---
135+
136+
### 📦 Package Info
137+
138+
| | |
139+
| ------- | --------------------------- |
140+
| NuGet | `Sprout` |
141+
| Target | .NET Standard 2.0. |
142+
| License | MIT |
143+
| Author | Daniel Lidström |

Sprout.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<PackageId>Sprout</PackageId>

0 commit comments

Comments
 (0)