Proper use of jsdom

Signed-off-by: Jean-Denis Vauguet <jd@vauguet.fr>