title: How to unit test DOM manipulation (with jasmine)
body: <p>I need to unit test some DOM manipulation functions with Jasmine (currently I run my tests in the browser and with Karma)</p>
  <p>I was wondering what the best approach would be to do this?</p>
  <p>For example, I can mock and stub the <strong>window</strong> and <strong>document</strong> objects and spyOn a couple of their functions. But this doesn't really look like an easy solution, so thats why I'm asking this question!</p>
  <p>Or is there a better way (not using jasmine maybe) to do this ?</p>
  <p>Thanks a lot</p>