testing javascript is the bane of humanity