Add javascript unit tests