jemboh / car_lab

Lab with testing and OOP in JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prototype Body Shop

The goal of this homework is to get you comfortable with writing and implementing prototypes and constructors. It will also introduce testing.

  1. Fork the repository
  2. Clone and cd into the car_lab folder
  3. run npm install
  4. run npm test
  • Read the output to the terminal carefully!

  • Open the folder in sublime and navigate to /spec/test.js and /src/car.js.

  • Write code in car.js to make any failing tests pass.

  • Once all tests are either passed or pending, go into test.js and search the file for the first instance of "xit". Delete the "x" (change "xit" to "it") and run npm test again. Repeat until all 14 tests pass!

Extension

Write tests for parking the car then make them pass. (Hint: What happens to the state of the car when you park? What usually happens to passengers when a car is parked?)

About

Lab with testing and OOP in JS


Languages

Language:JavaScript 100.0%