I am new to testing in js.
I would like to unit-test parts of my js and afterwards add some functional tests. The problem is, that I am using the window object and document.
For e.g. I am exposing my module from the closure like this.
window.nestable = definition(window);
and of course there are things like
document.getElementById('id')
How would I go about unit testing this? I did not find the information in the docs, so I hope you might be able to help me.
Aucun commentaire:
Enregistrer un commentaire