File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,25 @@ export function wrappedRenderC(
141141 return pure . render ( ui , { wrapper : AppWrapperProps , ...options } )
142142}
143143
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+
144163/*
145164eslint
146165 testing-library/prefer-explicit-assert: "off",
You can’t perform that action at this time.
0 commit comments