question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve tests structure

See original GitHub issue

When 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:open
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ZhangYiJiangcommented, Feb 19, 2018
0reactions
li-kaicommented, Feb 19, 2018

I just realized there is no need to write a codeshift to convert top level ‘test’ to ‘describe’. We can just use regex.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found