Improve js unit tests.