refactor(locationSpec): make helper functions take an object

Makes tests more readable