nodejs-integration-tests-best-practices
nodejs-integration-tests-best-practices copied to clipboard
VSCode snippets for integration tests
Idea: Generate snippets with common component tests patterns
- Test with when-then + AAA
- nock verify outgoing payload
- Assert HTTP response
- Describe with API verbs (/api + describe for POST, GET, DELETE)
- Randmoize unique value
- Axios request with token
- Example of basic test which assert the response
- Example of basic test which asserts the existing state
- Example of basic test which asserts outgoing call
- Others?