Closed sunecosuri closed 2 years ago
Hi! The main reason is that HTMLElement
does not include SVG elements: https://github.com/testing-library/react-testing-library/pull/833
thank you for the question!
I went looking for this exact same thing. I noticed in the react-testing-library
there was some sort of solution to this. https://github.com/testing-library/react-testing-library/pull/868 Is there a reason not to follow suite here in vue-testing-library
?
The other reason I feel this is reasonable is that all the query functions returned from render
assume they received an HTMLElement.
The following lines. https://github.com/testing-library/vue-testing-library/blob/main/types/index.d.ts#L21-L22
I thought it would be more convenient to same as arguments like
findBy~~~
in query the HTMLElement type. https://github.com/testing-library/dom-testing-library/blob/main/types/queries.d.ts#L63Is there any reason?