currently I am creating a custom web component and I want to use mocha as my testing framework. Is there a way to check whether the component that I created is inserted into the DOM?

1 Answers

Todd Chaffee On Best Solutions

Mocha is mostly just a framework to describe your tests and assert things. For checking whether a component you created is in the DOM, you can probably use plain old JavaScript with document.querySelector or document.get​Element​ById. But yes, you would use that together with Mocha to write your test.