Libraries for e2e tests like cypress, playwright, Puppeteer are popular among testers. Developers, in addition to e2e tests, prefer to write lightweight tests for their applications. For this purpose, there is a popular DOM Testing Library.
https://hackernoon.com/dom-testing-library-is-it-worth-a-try
https://hackernoon.com/dom-testing-library-is-it-worth-a-try