Creating unit tests for DOM manipulation using jest in teams for education testing UI
I would like to know if there is a way for me to write unit tests for JS code that manipulates some DOM elements. for example, tests for js code that adds elements to an existing HTML list. Something like: this
I am able to create these tests outside of the replit teams for education testing UI and run them through shell (jest), by using JSDOM as the testing environment, but am unable to find how I can change the testing environment for the replit testing UI in replit( language = node ).
Using it via testing UI would enable my students to run tests via pressing a button, and reflect the results in overview, so I would love to be able to do this.
Would love help on this!
Thanks in advance!