Skip to content

Commit b793134

Browse files
authored
Update the instructions about running the tests
- Remove the mention of Github Actions - Move section "Automated Testing" to the end - Simplify the section "Automated Testing" and rename it to "Test Your Code" - Add instructions about testing environment and the completion order
1 parent bbd5108 commit b793134

File tree

1 file changed

+60
-51
lines changed

1 file changed

+60
-51
lines changed

README.md

Lines changed: 60 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,83 +11,44 @@ Manipulating arrays in code is a very common operation. Whether you are creating
1111
## Requirements
1212

1313
- Fork this repo
14+
1415
- Clone it to your machine
15-
- Visit the "actions" tab in your fork, and enable workflows.
16+
17+
1618

1719
## Submission
1820

19-
Upon completion, run the following commands:
21+
- Upon completion, run the following commands:
2022

2123
```bash
2224
git add .
2325
git commit -m "Solved lab"
2426
git push origin master
2527
```
2628

27-
Create Pull Request so your TAs can check up your work.
28-
29-
<br>
30-
31-
## Automated Testing Introduction
29+
- Create a Pull Request so that your TAs can check your work.
3230

3331
<br>
3432

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.
48-
49-
<br>
50-
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.
5633

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. 🤝
5934

60-
Let's go!
35+
## Instructions
6136

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.
37+
You will work on the `src/functions-and-arrays.js` file, which is already loaded in the `index.html` file. To run the JavaScript code open the `index.html` file using the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) VSCode extension.
6338

64-
```shell
65-
$ cd lab-javascript-functions-and-arrays
66-
$ npm install
67-
$ npm run test:watch
68-
```
39+
To see output of your JavaScript code open the [Console in the Developer Tools](https://developer.chrome.com/docs/devtools/open/#console).
6940

70-
<br>
41+
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.
7142

72-
In case you want to check the tests, they are in the `tests/functions-and-arrays.spec.js` file.
7343

74-
Open the `lab-solution.html` file using the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) VSCode extension.
7544

76-
<br>
45+
### Note about tests
7746

78-
#### Pass the tests
79-
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-
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.
83-
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.
47+
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.
8548

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.
49+
**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 and then correct your code to pass the failing tests.
8750

88-
<br>
8951

90-
## Instructions
9152

9253
<br>
9354

@@ -305,4 +266,52 @@ Following the logic you've used in iteration #8, declare a function called `grea
305266

306267
<br>
307268

269+
270+
271+
## Test Your Code
272+
273+
<br>
274+
275+
### Automated Testing
276+
277+
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.
278+
279+
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.
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.
312+
313+
<br>
314+
315+
##
316+
308317
**Happy coding!** :heart:

0 commit comments

Comments
 (0)