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.

Rule proposal: enforce it() description to start with "should"

See original GitHub issue

Would it make sense to enforce having descriptive test names by warning if it() description does not start with “should”. Example of violation:

it("I want to test something", function () {
  // ...
});

Valid usage:

it("should test something", function () {
  // ...
});

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alecxecommented, Jun 28, 2016

How about this: we implement this rule with a configurable parameter - a regular expression that an it() description should match against? By default, we would configure it as ^should.

We can also do the same for describe but have this rule disabled by default.

What do you think? Thanks.

0reactions
lo1tumacommented, Jun 29, 2016

Sounds good to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide to the Rulemaking Process - Federal Register
Proposed rules have preambles which contain a summary, date and contact information, and supplementary information. A proposed rule begins with a “Summary” of ......
Read more >
The U.S. Department of Education Releases Proposed ...
The proposed amendments will restore crucial protections for students who are victims of sexual harassment, assault, and sex-based ...
Read more >
App Store Review Guidelines - Apple Developer
The App Store Review Guidelines provide guidance and examples across a range of development topics, including user interface design, ...
Read more >
Electronic Logging Devices | FMCSA
The electronic logging device (ELD) rule – congressionally mandated as a part of MAP-21 – is intended to help create a safer work...
Read more >
Strengthening Organic Enforcement Proposed Rule
The United States Department of Agriculture (USDA) Agricultural Marketing Service (AMS) proposes amending the USDA organic regulations to strengthen oversight ...
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