File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 33 registerComponent ,
44 mountComponent ,
55 mountComponents ,
6- defineProps
6+ defineProps ,
7+ SimpleElement
78} from '../src'
89
910it ( 'mounts a component' , ( ) => {
@@ -162,11 +163,13 @@ it('interferes prop types from default values', () => {
162163
163164it ( `exposes the component function's return value` , ( ) => {
164165 const exposed = { test : ( ) => { } }
165- registerComponent ( 'test' , ( ) => exposed )
166+ const component = registerComponent ( 'test' , ( ) => exposed )
166167
167168 document . body . innerHTML = `
168169 <div data-simple-component="test" id="my-id"></div>
169170 `
171+
170172 mountComponents ( document . body )
171- expect ( document . getElementById ( 'my-id' ) ?. $component ) . toBe ( exposed )
173+ const el = document . getElementById ( 'my-id' ) as SimpleElement < typeof component >
174+ expect ( el . $component ) . toBe ( exposed )
172175} )
You can’t perform that action at this time.
0 commit comments