updated javascript unit tests