You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-22Lines changed: 10 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,10 @@ Manipulating arrays in code is a very common operation. Whether you are creating
15
15
16
16
Upon completion, run the following commands:
17
17
18
-
```
19
-
$ git add .
20
-
$ git commit -m "done"
21
-
$ git push origin master
18
+
```bash
19
+
git add .
20
+
git commit -m "done"
21
+
git push origin master
22
22
```
23
23
24
24
Create Pull Request so your TAs can check up your work.
@@ -31,47 +31,35 @@ Automated software testing is the process of programmatically executing an appli
31
31
32
32
Testing should be viewed as a continuous process, not a discrete operation or single activity in the development lifecycle. Designing tests at the beginning of the product lifecycle can be help to mitigate common issues that arise when developing complex code bases.
33
33
34
-
Having a strong _test suite_ can provide you ease of mind, since you will be able to confidently improve upon your work while knowing that your not breaking a previously developed feature.
34
+
Having strong _test suites_ can provide you ease of mind, since you will be able to confidently improve upon your work while knowing that your not breaking a previously developed feature.
35
35
36
36
### Testing labs
37
37
38
38
This lab, along with some of the labs you will be working on during the bootcamp, has a complete test suite that is meant to ensure that your work fulfills the requirements we established.
Jasmine is an automated testing framework for JavaScript. It is designed to be used in Behavior-driven Development (**BDD**) programming, which focuses more on the business value than on the technical details.
40
+
### Testing with Jest
45
41
46
-
We have already included Jasmine in the project you just forked, so let's see how to use it to implement our code.
47
-
48
-
### Usage
42
+
Jest is an automated test-runner for JavaScript.
49
43
50
44
Before start coding, we will explain the project structure we have provided you:
51
45
52
46
```
53
47
lab-js-functions-and-arrays
54
48
├── README.md
55
49
├── SpecRunner.html
56
-
├── jasmine
57
-
│ └── ...
58
50
├── src
59
51
│ └── functions-and-arrays.js
60
52
└── tests
61
53
└── functions-and-arrays.spec.js
62
54
```
63
55
64
-
We will be working with the `src/functions-and-arrays.js`. In the `jasmine` folder you can find all of the files needed to use Jasmine. All these files are already linked with the `SpecRunner.html` file. In case you want to check the tests, they are in the `tests/functions-and-arrays.spec.js` file.
65
-
66
-
#### Run tests
67
-
68
-
Running automated tests with Jasmine is super easy. All you need to do is open the `SpecRunner.html` file in your browser. You will find something similar this:
56
+
We will be working with the `src/functions-and-arrays.js` file. To run your tests, open your terminal at the root directory of the lab, run `npm install` to install your dependencies and `npm run test:watch` to generate the `lab-solution.html` file. In case you want to check the tests, they are in the `tests/functions-and-arrays.spec.js` file.
Open the `lab-solution.html` file using the live server VSCode extension.
71
59
72
60
#### Pass the tests
73
61
74
-
You should write your code on the `src/functions-and-arrays.js` file. While following the instructions for each iteration, you should check every test and make sure it's _passing_, before moving on.
62
+
You should work on the `src/functions-and-arrays.js` file. While following the instructions for each iteration, you should check every test and make sure it's _passing_, before moving on.
75
63
76
64
Do not rush. You should take your time to carefully read every iteration, and you should address the _breaking_ tests as you progress through the exercise.
0 commit comments