Skip to content

Commit f5b72b5

Browse files
committed
Updates with notes for Module 9 Testing
1 parent d96a431 commit f5b72b5

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,115 @@ As a team go through the available linting rules and decide which ones to includ
609609
}
610610
```
611611

612+
## Module #9: Testing and Continuous Integration
613+
614+
### Testing Styles
615+
616+
- Unit Testing
617+
- Integration Testing
618+
- UI Testing
619+
620+
### Testing Frameworks
621+
622+
- #### Mocha (author's choice)
623+
624+
- Most popular
625+
- Highly configurable
626+
- Large eco-system of support
627+
628+
- #### Jasmine
629+
630+
- Popular
631+
- Includes assertion library
632+
633+
- #### Tape
634+
635+
- Lean
636+
- Simple
637+
- Minimal configuration
638+
639+
- #### QUnit
640+
641+
- Oldest; jQuery
642+
643+
- #### AVA
644+
645+
- Runs tests in parallel
646+
- Only re-runs impacted tests
647+
648+
- #### Jest
649+
650+
- Facebook
651+
- Popular for React developers
652+
- Wrapper for Jasmine
653+
- Code Coverage
654+
- JSDOM
655+
- Popular convention for finding test files
656+
657+
### Assertion Libraries
658+
659+
- Chai (author's choice)
660+
- ShouldJS
661+
- Expect
662+
663+
### Helper Libraries
664+
665+
- #### JSDOM (author's choice)
666+
667+
- Simulate the browser's DOM
668+
- Run DOM-related tests without a browser
669+
670+
- #### Cheerio
671+
672+
- jQuery for the server
673+
- Query virtual DOM using jQuery selectors
674+
675+
### Where To Run Tests
676+
677+
- In a browser
678+
- Karma, Testem
679+
- In a Headless browser
680+
- PhantomJS
681+
- In-memory DOM (author's choice - see above)
682+
- JSDOM
683+
684+
### Where Do Test Files Belong?
685+
686+
- Centralized
687+
- Mocha
688+
- Folder called "Tests"
689+
- Less "noise" in src folder
690+
- Deployment confusion
691+
- Inertia
692+
- Alongside (author's choice)
693+
- Easy imports
694+
- Clear visibility
695+
- Convenient to open
696+
- No recreating folder structure
697+
- Easy file moves
698+
699+
### File Naming Convention
700+
701+
- filename.spec.js
702+
- filename.test.js
703+
704+
### When Should Unit Tests Run?
705+
706+
- When you hit save
707+
- Rapid feedback
708+
- Facilitates TDD
709+
- Automatic; low friction
710+
- Increases test visibility
711+
712+
### Testing Plan
713+
714+
- Mocha Framework
715+
- Chai Assertion Library
716+
- JSDOM Helper Library (In-Memory DOM)
717+
- Node to run our tests
718+
- Place our test files alongside the actual files (using filename.spec.js or filename.test.js?)
719+
- Tests will run everytime we save
720+
612721

613722

614723
## Bibliography

0 commit comments

Comments
 (0)