refactored map.utils.js unit tests