/agl-developer-test

AGL Programming challenge

Primary LanguageJavaScript

AGL Developer Programming Challenge

This is a sample code to consume a json hosted at http://agl-developer-test.azurewebsites.net/people.json and output a list of all the cats in alphabetical order under a heading of the gender of their owner.

Example:

Male
- Angel
- Molly
- Tigger

Female
- Gizmo
- Jasper

Scripts

# to install node modules (to be done once)
npm install

# to run the project
npm start

# to run test suites
npm test

# to create build
npm run build

# to run test cases in watch mode
npm run tdd

Tools used

This project is written using the following tools:

Output

Coverage Report

Coverage

To get coverage report

npm test

Coverage Report

HTML Report can be accessed from here

Known Issue

The server does not support Cross Origin Resource Sharing (CORS), therefore the below error may be shown:

FAILED: Failed to fetch

To fix this, start Google Chrome with disabled web-security using the following command:

In MAC

open -a "Google Chrome" --args --user-data-dir --disable-web-security

In Windows

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\chrome"