Matcher for reading from channels
Ouverte
- Langage dominant
- Go
- Étoiles
- 30
- Forks
- 4
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Often we are asserting on reading from a channel. It would be useful to have one that could read from channel and make further assertions on the result.
e.g.
```go
c := make(chan int, 100)
// ...
expect(c).To.Receive().And.Equal(90)
```
This example has more than just the `Receive` functionality. It also includes some chaining. If is distasteful, then maybe the following would be more palatable:
```go
c := make(chan int, 100)
// ...
expect(c).To.Receive(&i).Else.FailNow()
expect(i).To.Equal(90)
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.