From 850905c6ddd952b657d873aa82998745b032ba45 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Thu, 18 Jan 2024 01:51:51 -0300 Subject: [PATCH 1/2] Automated testing, warn advanced topic --- 1-js/03-code-quality/05-testing-mocha/article.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/1-js/03-code-quality/05-testing-mocha/article.md b/1-js/03-code-quality/05-testing-mocha/article.md index 4c2b1aa5e3..56d2b8c24f 100644 --- a/1-js/03-code-quality/05-testing-mocha/article.md +++ b/1-js/03-code-quality/05-testing-mocha/article.md @@ -2,6 +2,12 @@ Automated testing will be used in further tasks, and it's also widely used in real projects. +```warn header="Advanced topic" +Writing tests requires a good understanding of JavaScript. + +If you are a beginner, you're not required to write tests as of now, but you should know how the procedure works. +``` + ## Why do we need tests? When we write a function, we can usually imagine what it should do: which parameters give which results. @@ -18,7 +24,7 @@ For instance, we're creating a function `f`. Wrote some code, testing: `f(1)` wo That's very typical. When we develop something, we keep a lot of possible use cases in mind. But it's hard to expect a programmer to check all of them manually after every change. So it becomes easy to fix one thing and break another one. -**Automated testing means that tests are written separately, in addition to the code. They run our functions in various ways and compare results with the expected.** +**Tests are entirely separate code from the code being tested. They are developed in parallel to the main code, executing our functions in diverse ways and comparing the results against the expected outcomes.** ## Behavior Driven Development (BDD) From 6f4f765b861c188893d7f87fcb46afaab3080196 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Wed, 7 Feb 2024 08:55:37 -0300 Subject: [PATCH 2/2] Update article.md --- 1-js/03-code-quality/05-testing-mocha/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/03-code-quality/05-testing-mocha/article.md b/1-js/03-code-quality/05-testing-mocha/article.md index 56d2b8c24f..495d05d5dd 100644 --- a/1-js/03-code-quality/05-testing-mocha/article.md +++ b/1-js/03-code-quality/05-testing-mocha/article.md @@ -24,7 +24,7 @@ For instance, we're creating a function `f`. Wrote some code, testing: `f(1)` wo That's very typical. When we develop something, we keep a lot of possible use cases in mind. But it's hard to expect a programmer to check all of them manually after every change. So it becomes easy to fix one thing and break another one. -**Tests are entirely separate code from the code being tested. They are developed in parallel to the main code, executing our functions in diverse ways and comparing the results against the expected outcomes.** +**Automated testing means that tests are written separately, in addition to the code. They run our functions in various ways and compare results with the expected.** ## Behavior Driven Development (BDD)