Answer the question
In order to leave comments, you need to log in
How to test the creation of a home element in a function using jest?
Good afternoon, I have a function that creates a dom element inside itself.
const myFunction = () => {
const myVariable= document.createElement('script');
window.addEventListener('event', () => {
// some content
}
document.body.appendChild(myFunction);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question