File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,25 @@ export function wrappedRenderC(
141
141
return pure . render ( ui , { wrapper : AppWrapperProps , ...options } )
142
142
}
143
143
144
+ export function testBaseElement ( ) {
145
+ const { baseElement : baseDefaultElement } = render ( < div /> )
146
+ expectType < HTMLElement , typeof baseDefaultElement > ( baseDefaultElement )
147
+
148
+ const container = document . createElement ( 'input' )
149
+ const { baseElement : baseElementFromContainer } = render ( < div /> , { container} )
150
+ expectType < typeof container , typeof baseElementFromContainer > (
151
+ baseElementFromContainer ,
152
+ )
153
+
154
+ const baseElementOption = document . createElement ( 'input' )
155
+ const { baseElement : baseElementFromOption } = render ( < div /> , {
156
+ baseElement : baseElementOption ,
157
+ } )
158
+ expectType < typeof baseElementOption , typeof baseElementFromOption > (
159
+ baseElementFromOption ,
160
+ )
161
+ }
162
+
144
163
/*
145
164
eslint
146
165
testing-library/prefer-explicit-assert: "off",
You can’t perform that action at this time.
0 commit comments