Skip to content

Commit

Permalink
Blog/crucial tests (#295)
Browse files Browse the repository at this point in the history
* First draft

* First draft

* Added verdaccio test (#268)

* Update index.md

* fix comment

* added the verdaccio test

* Update index.md

* used import/export and update content

* update content

* update content

* Genric message

* Genric message

* Genric message

* Genric message

* Genric message

* Correct date

* Correct date

* Genric message2

* Genric message2

* Genric message2

---------

Co-authored-by: Yoni Goldberg <[email protected]>
Co-authored-by: Raz Luvaton <[email protected]>
  • Loading branch information
3 people authored Jul 11, 2023
1 parent 27e7369 commit 0f17bb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/blog/crucial-tests/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,11 @@ beforeAll(() => {
- Test your HTTP client retry mechanism (very easy with nock)
- Test that the DB migration succeed and the new code can work with old records format
- Test DB connection disconnects
- You may find many more examples at my fresh new testing course - [testjavascript.com](www.testjavascript.com)
- You may find many more examples at my fresh new testing course - [testjavascript.com](https://testjavascript.com)


## It's not just ideas, it a whole new mindset

The examples above were not meant only to be a checklist of 'don't forget' test cases, but rather a fresh mindset on what tests could cover for you. Modern tests are not just about functions, or user flows, but any risk that might visit your production. This is doable only with component/integration tests but never with unit or end-to-end tests. Why? Because unlike unit you need all the parts to play together (e.g., the DB migration file, with the DAL layer and the error handler all together). Unlike E2E, you have the power to simulate in-process scenarios that demand some tweaking and mocking. Component tests allow you to include many production moving parts early on your machine. I like calling this 'production-oriented development'

**My new online testing course -** If you're intrigued with beyond the basics testing patterns, consider my online course which was just launched and is 🎁 on sale for 30 days (July 2023)
**My new online testing course -** If you're intrigued with beyond the basics testing patterns, ]consider my online course which was just launched and is 🎁 on sale for 30 days (July 2023)](https://testjavascript.com)

0 comments on commit 0f17bb8

Please sign in to comment.