Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 887ee23

Browse files
committed
Add testing section
1 parent 2f8c0ce commit 887ee23

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ readable, reusable, and refactorable software in JavaScript. Enjoy!
99
2. [Functions](#functions)
1010
3. [Objects and Data Structures](#objects-and-data-structures)
1111
4. [Classes](#classes)
12-
5. [Concurrency](#concurrency)
13-
6. [Formatting](#formatting)
14-
7. [Comments](#comments)
12+
5. [Testing](#testing)
13+
6. [Concurrency](#concurrency)
14+
7. [Formatting](#formatting)
15+
8. [Comments](#comments)
1516

1617
## **Variables**
1718
### Use meaningful and pronounceable variable names
@@ -1393,6 +1394,21 @@ class EmployeeTaxData {
13931394
```
13941395
**[⬆ back to top](#table-of-contents)**
13951396

1397+
## **Testing**
1398+
Testing is more important than shipping. If you have have no tests or an
1399+
inadequate amount, then every time you ship code you won't be sure that you
1400+
didn't break anything. Deciding on what constitutes an adequate amount is up
1401+
to your team, but having 100% coverage (all statements and branches) is how
1402+
you achieve very high confidence and developer peace of mind.
1403+
1404+
There's no excuse to not write tests. There's [plenty of good JS test frameworks]
1405+
(http://jstherightway.org/#testing-tools), so find one that your team prefers.
1406+
When you find one that works for your team, then aim to always write tests
1407+
for every new feature/module you introduce. If your preferred method is
1408+
Test Driven Development (TDD), that is great, but the main point is to just
1409+
make sure you are reaching your coverage goals before launching any feature,
1410+
or refactoring an existing one.
1411+
13961412
## **Concurrency**
13971413
### Use Promises, not callbacks
13981414
Callbacks aren't clean, and they cause excessive amounts of nesting. With ES6,

0 commit comments

Comments
 (0)