Completed implementing JavaScript unit tests