Last active
February 18, 2020 16:35
-
-
Save CoditCompany/b3d16426362595849a8be0ec579379a2 to your computer and use it in GitHub Desktop.
F# reactive marble testing of the filter operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<Fact>] | |
let ``filter emit only those items from an observable that pass a predicate test`` () = | |
TestSchedule.usage <| fun sch -> | |
let stub = cold "--2-(30)--(22)-5--(60)-1--|" sch | |
let expected = "-- -(30)--(22)- --(60)- --|" | |
stub |> Observable.filter (fun x -> int x > 10) | |
|> Marbles.expectMessages sch expected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment