@@ -10,8 +10,6 @@ import scala.scalajs.js.annotation.JSImport
1010@ js.native
1111object ReactTestUtils extends js.Object {
1212
13- type Instance = js.Object with js.Dynamic
14-
1513 /**
1614 * @see [[scommons.react.test.dom.raw.Simulate ]]
1715 */
@@ -22,76 +20,4 @@ object ReactTestUtils extends js.Object {
2220 * This makes your test run closer to how React works in the browser.
2321 */
2422 def act (block : js.Function0 [Unit ]): Unit = js.native
25-
26- /**
27- * Render a React element into a detached DOM node in the document. This function requires a DOM.
28- */
29- def renderIntoDocument (element : js.Object ): Instance = js.native
30-
31- /**
32- * Returns `true` if `element` is any React element.
33- */
34- def isElement (element : js.Any ): Boolean = js.native
35-
36- /**
37- * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
38- */
39- def isElementOfType (element : js.Any , componentClass : js.Object ): Boolean = js.native
40-
41- /**
42- * Returns `true` if `instance` is a DOM component (such as a `div` or `span`).
43- */
44- def isDOMComponent (instance : js.Any ): Boolean = js.native
45-
46- /**
47- * Returns `true` if `instance` is a user-defined component, such as a class or a function.
48- */
49- def isCompositeComponent (instance : js.Any ): Boolean = js.native
50-
51- /**
52- * Returns `true` if `instance` is a component whose type is of a React componentClass.
53- */
54- def isCompositeComponentWithType (instance : js.Any , componentClass : js.Object ): Boolean = js.native
55-
56- /**
57- * Traverse all components in `tree` and accumulate all components where `test(component)` is `true`.
58- * This is not that useful on its own, but it's used as a primitive for other test utils.
59- */
60- def findAllInRenderedTree (tree : js.Any ,
61- test : js.Function1 [Instance , Boolean ]): js.Array [Instance ] = js.native
62-
63- /**
64- * Finds all DOM elements of components in the rendered tree that are DOM components with the class name
65- * matching `className`.
66- */
67- def scryRenderedDOMComponentsWithClass (tree : js.Any , className : String ): js.Array [Instance ] = js.native
68-
69- /**
70- * Like `scryRenderedDOMComponentsWithClass()` but expects there to be one result, and returns that one result,
71- * or throws exception if there is any other number of matches besides one.
72- */
73- def findRenderedDOMComponentWithClass (tree : js.Any , className : String ): Instance = js.native
74-
75- /**
76- * Finds all DOM elements of components in the rendered tree that are DOM components with the tag name
77- * matching `tagName`.
78- */
79- def scryRenderedDOMComponentsWithTag (tree : js.Any , tagName : String ): js.Array [Instance ] = js.native
80-
81- /**
82- * Like `scryRenderedDOMComponentsWithTag()` but expects there to be one result, and returns that one result,
83- * or throws exception if there is any other number of matches besides one.
84- */
85- def findRenderedDOMComponentWithTag (tree : js.Any , tagName : String ): Instance = js.native
86-
87- /**
88- * Finds all instances of components with type equal to `componentClass`.
89- */
90- def scryRenderedComponentsWithType (tree : js.Any , componentClass : js.Object ): js.Array [Instance ] = js.native
91-
92- /**
93- * Same as `scryRenderedComponentsWithType()` but expects there to be one result and returns that one result,
94- * or throws exception if there is any other number of matches besides one.
95- */
96- def findRenderedComponentWithType (tree : js.Any , componentClass : js.Object ): Instance = js.native
9723}
0 commit comments