Adding unit tests examples to the documentation
See original GitHub issueDescription
Hi all,
Thanks for a great framework!
It would be very useful if you could add to the documentation just a few examples of unit tests for bolt app. I suppose that writing tests is not that complicated if you have some experience, but it would be a great help for people who are new to mocking, stubbing etc.
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x
in each of the [ ]
)
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Documentation unit tests - Medium
Example test run showing classes that are missing their documentation ... Adding unit tests to your documentation in this way faces an ...
Read more >Unit Testing Tutorial – What is, Types & Test Example - Guru99
The purpose is to validate that each unit of the software code performs as expected. Unit Testing is done during the development (coding ......
Read more >Best practice guide for documenting unit tests?
Carefully name tests reflecting requirement in the form of input data & expected result. I have been in similar situation but for ...
Read more >unittest — Unit testing framework — Python 3.11.1 ...
Third-party unittest framework with a lighter-weight syntax for writing tests. For example, assert func(10) == 42 . The Python Testing Tools Taxonomy.
Read more >Best practices for writing unit tests - .NET - Microsoft Learn
Learn best practices for writing unit tests that drive code quality and resilience for .NET Core and .NET Standard projects.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I recently created an open source app called Asking for a Friend, which was written in TypeScript, lifted with Eslint and Prettier, and has 99% test coverage via Jest. I figured out a new pattern for the declaration of listener methods and it’s worked really well for me when it comes to testing. Here’s an example:
postAnonymousQuestion.ts
(Functionality to test)postQuestionAnonymously.test.ts
(Tests to cover above functionality)Check out that project if you like the pattern above 🙂
@RayBB a simple flow which works for me:
I can attach some code snippets if they may be useful
But for sure using the tool mentioned by seratch would be more straightforward