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
+59-50Lines changed: 59 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -11,83 +11,46 @@ Manipulating arrays in code is a very common operation. Whether you are creating
11
11
## Requirements
12
12
13
13
- Fork this repo
14
+
14
15
- Clone it to your machine
15
-
- Visit the "actions" tab in your fork, and enable workflows.
16
+
17
+
16
18
17
19
## Submission
18
20
19
-
Upon completion, run the following commands:
21
+
-Upon completion, run the following commands:
20
22
21
23
```bash
22
24
git add .
23
25
git commit -m "Solved lab"
24
26
git push origin master
25
27
```
26
28
27
-
Create Pull Request so your TAs can check up your work.
28
-
29
-
<br>
30
-
31
-
## Automated Testing Introduction
32
-
33
-
<br>
34
-
35
-
### What is automated testing?
36
-
37
-
Automated software testing is the process of programmatically executing an application in order to validate and verify that it meets the business needs, as well as the technical requirements, and that it behaves as expected.
38
-
39
-
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.
40
-
41
-
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.
42
-
43
-
<br>
44
-
45
-
### Testing labs
46
-
47
-
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.
29
+
- Create a Pull Request so that your TAs can check your work.
48
30
49
31
<br>
50
32
51
-
### Testing with Jest
52
-
53
-
Jest is an automated test-runner for JavaScript.
54
-
55
-
Before start coding, we will explain the project structure we have provided you.
56
33
57
-
We will be working with the `src/functions-and-arrays.js` file.
58
-
The process you will be following step by step in this lab stays the same for all the following labs. It will take you a bit to actually become comfortable with it, but don't worry, it is completely okay to get stuck! We are here to help. 🤝
59
34
60
-
Let's go!
61
-
62
-
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 run the tests and generate the `lab-solution.html` file.
63
-
64
-
```shell
65
-
$ cd lab-javascript-functions-and-arrays
66
-
$ npm install
67
-
$ npm run test:watch
68
-
```
35
+
## Instructions
69
36
70
-
<br>
37
+
You will work on the `src/functions-and-arrays.js` file, which is already loaded in the `index.html` file.
71
38
72
-
In case you want to check the tests, they are in the `tests/functions-and-arrays.spec.js` file.
39
+
To run the JavaScript code open the `index.html` file use the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) VSCode extension.
73
40
74
-
Open the `lab-solution.html` file using the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) VSCode extension.
41
+
To see output of your JavaScript code open the [Console in the Developer Tools](https://developer.chrome.com/docs/devtools/open/#console).
75
42
76
-
<br>
43
+
While following the instructions for each iteration, make sure to carefully read the instructions to fully understand the task requirements. Do not rush. You should take your time to carefully read every iteration.
77
44
78
-
#### Pass the tests
79
45
80
-
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.
81
46
82
-
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.
47
+
### Note about tests
83
48
84
-
When coding with tests, it is super important that you carefully read and understand the errors you are getting, this way you will know for sure what's expected from your code.
49
+
This LAB, along with some of the labs you will be working on during the bootcamp, is equipped with unit tests to provide automated feedback on your lab progress.
85
50
86
-
Note that **you don't need to execute the functions yourself**, the tests are responsible for doing that. All you should do is declare them, make sure they deal with the parameters passed and that they return what is indicated on the iterations and in the test messages. For some iterations we provide you with a sample array, so that you can do some **manual** testing, if you wish.
51
+
**After you’ve completed the basic iterations**, go to the **"Test Your Code"** section at the bottom. There you'll be asked to install the testing dependencies and run the tests to check how many tests your code is passing.
87
52
88
-
<br>
89
53
90
-
## Instructions
91
54
92
55
<br>
93
56
@@ -305,4 +268,50 @@ Following the logic you've used in iteration #8, declare a function called `grea
305
268
306
269
<br>
307
270
271
+
272
+
273
+
## Test Your Code
274
+
275
+
<br>
276
+
277
+
### Automated Testing
278
+
279
+
Automated software testing is the process of automatically testing an application in order to verify that it meets the technical requirements, and that it behaves as expected.
280
+
281
+
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.
282
+
283
+
284
+
285
+
<br>
286
+
287
+
### Testing with Jest
288
+
289
+
Jest is an automated test-runner for JavaScript.
290
+
291
+
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 run the tests and generate the `lab-solution.html` file.
292
+
293
+
```shell
294
+
$ cd lab-javascript-functions-and-arrays
295
+
$ npm install
296
+
$ npm run test:watch
297
+
```
298
+
299
+
<br>
300
+
301
+
In case you want to check the tests, they are in the `tests/functions-and-arrays.spec.js` file.
302
+
303
+
Open the `lab-solution.html` file using the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) VSCode extension.
304
+
305
+
<br>
306
+
307
+
#### Pass the tests
308
+
309
+
When coding with tests, it is super important that you carefully read and understand the errors you are getting, this way you will know for sure what's expected from your code.
310
+
311
+
Note that **you don't need to execute the functions yourself**, the tests are responsible for doing that. All you should do is declare them, make sure they deal with the parameters passed and that they return what is indicated on the iterations and in the test messages. For some iterations we provide you with a sample array, so that you can do some **manual** testing, if you wish.
0 commit comments