Skip to content

madebyck/javascript-code-test-ck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Code Test

How to run:

  1. Make sure you have Node.js v22 installed.
  2. Run npm install to get dependencies.
  3. Run npm run start to fetch books and see the output.
  4. Run npm test to run the test suite.

Assumptions/Comments

  • This project assumes the JSON response from the book API will be an array where each item contains nested book and stock objects, structured as follows:

    {
      "book": {
        "title": "Macbeth",
        "author": "William Shakespeare",
        "isbn": "123456789"
      },
      "stock": {
        "quantity": 5,
        "price": "6.99"
      }
    }
  • The client maps this response to a simpler object containing only these properties:

    {
      "title": "Macbeth",
      "author": "William Shakespeare",
      "isbn": "123456789",
      "quantity": 5,
      "price": "6.99"
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors