File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
gh-pages/src/main/scala/ghpages/secret/tests Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import japgolly.scalajs.react._
44import japgolly .scalajs .react .extra .Ajax
55import japgolly .scalajs .react .vdom .html_<^ ._
66import org .scalajs .dom .XMLHttpRequest
7- import scala .util .Random
7+ import scala .util .{ Random , Success }
88import scalaz .Equal
99import scalaz .std .anyVal ._
1010import scalaz .std .either ._
@@ -135,6 +135,17 @@ object AsyncTest {
135135 t -> 1
136136 })
137137
138+ .add(" init" )(testCmp {
139+ val x = AsyncCallback .init[Boolean , Int ] { f =>
140+ f(Success (123 )).delayMs(500 ).toCallback.ret(true )
141+ }
142+ val y = for {
143+ (b, ac) <- x.asAsyncCallback
144+ i <- ac
145+ } yield (b, i)
146+ y -> ((true , 123 ))
147+ })
148+
138149 .result()
139150
140151 def Component (): VdomElement =
You can’t perform that action at this time.
0 commit comments