If you need DOM access, some testing libraries like Jest provide a sort of pseudo-DOM that you can interact with and mock out the parts that aren't provided.
There is also JSDOM which is a Node implementation of the DOM that you could use with testing tools like Mocha/Chai that don't have built-in DOM support.
If you want full browser automation then you'll need an E2E testing tool. For that there's tools Puppeteer, Cypress.io. I don't recommend Selenium.
I'll look into Jest & check those E2E tools out! Thanks!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.