Creating a function for buying a car that works the way Steve expects it to. Here are Steve's specifications for an acceptable car to buy:
- The car must have fuel efficiency between 6 and 11 litres/100km
- The car must cost $5,000 or less
- If the car's color is pink, then he will buy it no matter what the price or litres/100km.
- If it's a hatchback, he will not buy it even if it's pink.
- The function should also throw an error if no car is passed in.
- Install dependencies using the
npm install
command. - Run test with
npm test
.
- chai
- mocha