Skip to content

Commit 5bf5d46

Browse files
committed
@js.native missing from tests
1 parent 8c70f22 commit 5bf5d46

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

test/src/test/scala/Sizzle.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package sizzle
22

33
import scala.scalajs.js
44

5-
// @js.native
5+
@js.native
66
object Sizzle extends js.Object {
77

88
type DOM = org.scalajs.dom.Element

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ object JsComponentTest extends TestSuite {
6969
}
7070
}
7171

72+
@js.native
7273
trait SampleReactComponentProperty extends js.Object {
7374
val propOne: js.UndefOr[String] = js.native
7475
}
7576

77+
@js.native
7678
trait SampleReactComponentState extends js.Object {
7779
val num: js.UndefOr[Int] = js.native
7880
val num2: js.UndefOr[Int] = js.native
@@ -103,8 +105,10 @@ object SampleReactComponentState {
103105
}
104106

105107
@JSName("SampleReactComponent")
108+
@js.native
106109
object SampleReactComponent extends JsComponentType[SampleReactComponentProperty, SampleReactComponentState, HTMLElement]
107110

111+
@js.native
108112
trait SampleReactComponentM extends JsComponentM[SampleReactComponentProperty, SampleReactComponentState, HTMLElement] {
109113
def getNum(): Int = js.native
110114

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import japgolly.scalajs.react.test.ReactTestUtils
1010

1111
object RefTest extends TestSuite {
1212

13+
@js.native
1314
trait ReactCssTransitionGroupM extends js.Object
1415

1516
val Static = ReactComponentB.staticN[HTMLElement]("static", <.h2("nice")).buildU

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ object TestUtil {
116116
trait A
117117
trait B
118118
type U = Unit
119-
abstract class N extends TopNode
119+
@js.native trait N extends TopNode
120120
val c = null.asInstanceOf[ReactComponentM[Unit, S, Unit, N]]
121121
val bs = null.asInstanceOf[BackendScope[P, S]]
122122

0 commit comments

Comments
 (0)