Improve javascript tests