Skip to content

Commit 2cfcf34

Browse files
authored
Merge pull request #3 from devmtn-aj/doc-fixes
Doc fixes
2 parents 599c679 + 791dfb7 commit 2cfcf34

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Project Summary
44

5-
In this project, we'll learn about TTD ( test driven development ). Using Jest, we'll create Unit Tests for methods and properties inside of `cart.js`. After the Unit Tests are created, we'll create the solution for `cart.js` to make all the Unit Tests pass. The TTD approach can lead to more confidence that the code you create meets all technical requirements.
5+
In this project, we'll learn about TDD ( test driven development ). Using Jest, we'll create Unit Tests for methods and properties inside of `cart.js`. After the Unit Tests are created, we'll create the solution for `cart.js` to make all the Unit Tests pass. The TDD approach can lead to more confidence that the code you create meets all technical requirements.
66

77
## Step 1
88

@@ -12,7 +12,7 @@ In this step, we'll create a `package.json` and install `jest` so that we can cr
1212

1313
### Instructions
1414

15-
* Initialze a `package.json` file.
15+
* Initialize a `package.json` file.
1616
* Install and save `jest` to development dependencies.
1717
* Modify the `test` script inside of `package.json` to be `"jest"`.
1818

@@ -90,7 +90,7 @@ const cart = require('./cart');
9090
const cars = require('./data/cars.js');
9191
```
9292

93-
When we require `cart.js`, we gain access to all of its exported methods and properties. You can view how many methods and properties there are by opening `cart.js`. We can group the test cases specifically for the two cart properties into a group called `Cart Properties:` and we can group the test caes specifically for the three methods into a group called `Cart Methods:`. In Jest, you can create test groups by using the `describe` keyword. The first `argument` for `describe` is the name of the group and the second `argument` is a callback function that holds all the test cases.
93+
When we require `cart.js`, we gain access to all of its exported methods and properties. You can view how many methods and properties there are by opening `cart.js`. We can group the test cases specifically for the two cart properties into a group called `Cart Properties:` and we can group the test cases specifically for the three methods into a group called `Cart Methods:`. In Jest, you can create test groups by using the `describe` keyword. The first `argument` for `describe` is the name of the group and the second `argument` is a callback function that holds all the test cases.
9494

9595
```js
9696
const cart = require('./cart');
@@ -351,7 +351,7 @@ test('removeFromCart() should decrease the total property.', function() {
351351
Let's move on to our last method: `checkout`. This method should be pretty easy to test. All we need to do here is add a random number of cars to our cart and then call the `checkout` method. We can then `expect` `cart` equals an empty array and we can then `expect` `total` equals `0`.
352352

353353
```js
354-
test('checkout() shoud empty the cart array and set total to 0.', function() {
354+
test('checkout() should empty the cart array and set total to 0.', function() {
355355
cart.addToCart( cars[0] );
356356
cart.addToCart( cars[1] );
357357
cart.addToCart( cars[2] );
@@ -434,7 +434,7 @@ describe('Cart Methods:', function() {
434434
expect( cart.total ).toEqual( cars[8].price );
435435
});
436436

437-
test('checkout() shoud empty the cart array and set total to 0.', function() {
437+
test('checkout() should empty the cart array and set total to 0.', function() {
438438
cart.addToCart( cars[0] );
439439
cart.addToCart( cars[1] );
440440
cart.addToCart( cars[2] );
@@ -459,7 +459,7 @@ In this step, you'll create the solutions to each method and property in `cart.j
459459
### Instructions
460460

461461
* Open `cart.js`.
462-
* Compelete the code for each `method` and `property` to make all the Unit Tests pass.
462+
* Complete the code for each `method` and `property` to make all the Unit Tests pass.
463463

464464
### Solution
465465

0 commit comments

Comments
 (0)