Skip to content

Commit acb4bfb

Browse files
committed
Test for #235
1 parent 8c2b7e8 commit acb4bfb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/src/test/scala/japgolly/scalajs/react/MonocleTest.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package japgolly.scalajs.react
22

33
import monocle._
4+
import monocle.macros.Lenses
45
import utest._
56
import React._
67
import ScalazReact._
@@ -10,6 +11,8 @@ import CompState._
1011

1112
object MonocleTest extends TestSuite {
1213

14+
@Lenses case class Poly[A](oa: Option[A])
15+
1316
val tests = TestSuite {
1417

1518
'inference {
@@ -32,6 +35,11 @@ object MonocleTest extends TestSuite {
3235
'ReactComponentM - test[ReactComponentM[P, S, U, N]](_ _setStateL lensST).expect[T => Unit]
3336
}
3437

38+
'poly {
39+
'zoomL - test[BackendScope[P, Poly[S]]](_ zoomL Poly.oa[S]).expect[ReadCallbackWriteCallbackOps[Option[S]]]
40+
'_setStateL - test[BackendScope[P, Poly[S]]](_ _setStateL Poly.oa[S]).expect[Option[S] => Callback]
41+
}
42+
3543
}
3644
}
3745
}

0 commit comments

Comments
 (0)