I'm using mocha to test my JavaScript code. The code involves html and css and implements a chat app. As far as I saw, Mocha can test JavaScript functions by matching the expected value to the function's return value.
But what if I want to test functions that don't return a value? Functions that mainly deal with DOM elements. (Like appending an image for example ).
How exactly can I mock DOM elements in mocha and then test if the function succeeds in generating the appropriate DOM elements?
I had looked around and found it was possible with selenium webdriver and jsdom. Is it possible to do this test with mocha alone and no other additional interfaces?