Skip to content

Commit

Permalink
Add test for rxquery.Zip (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
panesofglass authored Jan 13, 2018
1 parent 56f1ff5 commit 80a93c3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/ObservableSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ let ``When zip is defined with the applicative, it should match the result of Ob

Assert.That(!actual, Is.EqualTo (!expected))

[<Test>]
let ``zip used in rxquery matches output from Observable.zip`` () =
let a = Observable.ofSeq [1;2;3]
let b = Observable.ofSeq [1;2;3]

let expected = ResizeArray()
(Observable.zip a b).Subscribe(expected.Add) |> ignore

let actual = ResizeArray()
(rxquery {
for x in a do
zip y in b
yield x, y
}).Subscribe(actual.Add) |> ignore

Assert.That(List.ofSeq actual = List.ofSeq expected)

[<Test>]
let ``Test should show the stack overflow is fixed with Rx 2 beta``() =
let test() =
Expand Down

0 comments on commit 80a93c3

Please sign in to comment.