nicopicchio / tdd-booklist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test-Driven Development

Book List

Learning Objectives

  • Use a test framework to help test code
  • Use the Red Green Refactor loop to develop code
  • Test-drive a program with multiple functions with unit tests

Quickstart

  1. Fork this repository
  2. Clone your fork to your local machine (example command below, see note)
  3. Install project dependencies
$ git clone git@github.com:[username]/tdd-booklist.git && cd tdd-booklist
$ npm ci # to install dependencies

Instructions

  1. Implement the below requirements by following a test-driven development process.

Requirements

You need to write a program to manage a list of books. Your program should support the following features:

  • Add new books
  • Get a list all books
  • Get a list of books in a specific category (for example, "Horror") - only 3 books max should be returned
  • Get all books written by a particular author
  • Update the category of the book
  • Remove a book from the list

Extensions

  • Update your code so a book can have multiple categories
  • Get a list of all authors and the titles of the books they have written
  • Get a list of all available categories and the number of books in each category
  • Get the category with the most number of books

About