Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidkhahn/jest-unit-integration-tests
Jest: Unit tests, Integration tests, Automation tests
https://github.com/davidkhahn/jest-unit-integration-tests
integration-tests jest unit-test
Last synced: about 2 months ago
JSON representation
Jest: Unit tests, Integration tests, Automation tests
- Host: GitHub
- URL: https://github.com/davidkhahn/jest-unit-integration-tests
- Owner: DavidKHahn
- Created: 2019-10-07T18:10:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:47:03.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T20:04:32.459Z (almost 2 years ago)
- Topics: integration-tests, jest, unit-test
- Language: JavaScript
- Homepage:
- Size: 7.65 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Write tests. Not too many. Mostly integration.
https://www.youtube.com/watch?list=PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf&v=Fha2bVoC8SE
#### Why do we write tests?
- Enhanced Workflows and Confidence in making the app the way it should be!
#### How much code coverage do we need?- "Depends on the project/team"
- Startups tend to be a bit on the less side and larger companies tend to gear towards higher level.
**Implementation Details**
- If your test does something that the consumer of your doesn't then it's testing implementation details.
- If a refactor breaks your tests, then it's testing implementation details.#### UNIT TESTS:
"Unit Testing means, well, testing individual units of behavior. An individual unit of behavior is the smallest possible unit of behavior that can be individually tested in isolation. (I know that those two definitions are circular, but they seem to work out quite well in practice.)You can write unit tests before you write your code, after you write your code or while you write your code."
Source: https://softwareengineering.stackexchange.com/questions/59928/difference-between-unit-testing-and-test-driven-development
#### INTEGRATION TESTS:
"Test communication paths between different parts of the module done by the test department or by developers to show that all modules work correctly together."Source: https://softwareengineering.stackexchange.com/questions/48237/what-is-an-integration-test-exactly
#### END-TO-END TESTS:
"As stated above, the actual workflow. Someone puts a piece of goods to the shopping basket and fills in the user data, pays for it. I check if I actually received payment, make call to warehouse, make sure they received the data. And as little cherry on the pie: By receving the parcel, I make sure, that those data were good enough, were printed correctly, especially, when my real name is Pavel Janíček (see the funny diacritics? they sometimes get printed out incorrectly)."Source: https://stackoverflow.com/questions/19378183/difference-between-system-testing-and-end-to-end-testing
#### Tips on how to maximize integration tests:
- Poke fewer holes in reality.
- Test higher up on your tree.
**USEFUL LINK:**
- https://github.com/sapegin/jest-cheat-sheet (JEST CHEATSHEET)
- https://learntdd.in/react/ (Free resource for TDD testing: React, React Native and more)