Skip to content

kapilchokhawala/compass-coding-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a coding assignment as part of interview process at Compass.

Getting Started

Prerequisites

To begin using this solution, you will need the following softwares installed.

  1. Node.js -You can download this from Node.js Website and install it.
    • This solution was developed using Node v8.9.4
    • Installing Node will also install NPM (Node Package Manager)
  2. Git

Installation process

To setup this project and getting started is just few simple steps

  1. Clone this repository on your system
  2. (Optional) Navigate into the project folder or the repo as you may say that you just cloned and excute the command
    npm i or npm install
    

This will install all the node modules that are used/needed to run this solution succesfully.

This step is optional because when you run the test, npm install is run as pre step during every run. More about it can be found under Build and Test

Latest releases

The latest release have 2 tests, each making a search for properties. The 2 searches are

  1. Rental Property Search Filters used are
    • listingType = 0
    • geography = 'nyc'
  2. For-Sale Property Search Filters used are
    • listingType = 2
    • bedrooms = [2]
    • geography = 'santa_barbara_montecito'

As part of validation, following things were asserted

  1. Every response if in error, is asserted to check the error code, if error code = 400, the error message is thrown for reporting
  2. Both the above 2 search results are tested to check whether all the listings have 2 bedrooms and or of listingType = 2 (property is for Sale)
    • Hence, For-Sale Search will PASS but Rental Search will FAIL.
    • For Rental Properties have listingType = 0 and they will also have bedooms of count 0, 1, 3, 5, etc.

Build and Test

Once you have cloned the repository, navigate in to the project folder.

cd ../path to the project fodler/compass-coding-assignment

Now, to run the tests, execute

npm start

Remember how I said, "npm install" was optional. When you do "npm start", "npm install" is executed before running the actual test by default for every run.

Contribute

To contribute to this project you will need a good understanding of

  1. Javascript
  2. Node.js
  3. Request-Promise
  4. Mocha
  5. Assert
  6. Lodash
  7. Babel for using ES6

Contact The Author

In case you have any questions or issues related to this solution, feel free to reach out to me.

Kapil Chokhawala    |   (716) 795 - 2745    |   kapil.chokhawala@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published