fixing js unit tests