trait ReactTestUtils2 extends ReactTestUtilExtensions
- Alphabetic
- By Inheritance
- ReactTestUtils2
- ReactTestUtilExtensions
- ReactTestUtilExtensions1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def IsReactActEnvironment(): Boolean
- def IsReactActEnvironment_=(b: Boolean): Unit
- def act[A](body: => A): A
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface.
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
act { // render components } // make assertionsThis helps make your tests run closer to what real users would experience when using your application.
- def actAsync[F[_], A](body: F[A])(implicit F: Async[F]): F[A]
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface.
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
await act(async () => { // render components }); // make assertions
This helps make your tests run closer to what real users would experience when using your application.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newElement(): Element
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit final def reactTestExtMountedImpure[A[_], P, S](m: MountedSimple[Id, A, P, S]): ReactTestExt_MountedSimple[Id, A, P, S]
- Definition Classes
- ReactTestUtilExtensions
- implicit final def reactTestExtMountedSimple[F[_], A[_], P, S](m: MountedSimple[F, A, P, S]): ReactTestExt_MountedSimple[F, A, P, S]
- Definition Classes
- ReactTestUtilExtensions1
- def removeElement(e: Element): Unit
- def removeReactInternals(html: String): String
Turn
<div data-reactroot="">hello</div>into<div>hello</div> - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val withElement: WithDsl[Element, ImplicitUnit]
- val withReactRoot: WithDsl[TestReactRoot, ImplicitUnit]
- def withRendered[A](unmounted: A): WithDsl[TestDomWithRoot, Renderable[A]]