Skip to content

AlexAscherson/car_lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%