Improve tests structure
See original GitHub issueWhen https://github.com/facebook/jest/pull/5154 gets released, we should probably relook at our describe
and test
blocks. Some of them do not have a top level describe
and phrasing is inconsistent across the various tests. This is a good chance to clean them up.
Proposed format:
- Top-level
describe
with the component name that you are testing for. - For testing methods, use
MyComponent.myMethod
.
Feel free to add on to this. The purpose is to make them consistent across the code base.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (6 by maintainers)
Top Results From Across the Web
A Better Way to Structure Your Unit Tests | by Harry Nicholls
Making things better. Unit testing doesn't have to be daunting or complex. You can and should make it super simple. Just how you...
Read more >how unit tests can improve your product development?
This blog post read about unit tests, components of the testing pyramid, and how test-driven development saves time and costs.
Read more >How to Design Better Tests, Based on the Research | Edutopia
A review of a dozen recent studies reveals that to design good tests, teachers need to consider bias, rigor, and mindset.
Read more >11 Ways to Improve Software Testing through Planning, Work ...
Learn the ways to improve software testing and quality assurance through planning, establishing a productive work environment, ...
Read more >How to Structure a Unit Test - JavaScript in Plain English
How to Structure a Unit Test ... It is a way to arrange and organize test code to make unit tests clear and...
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
PR opened on flow-typed - https://github.com/flowtype/flow-typed/pull/1858
I just realized there is no need to write a codeshift to convert top level ‘test’ to ‘describe’. We can just use regex.