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.

[new-rule] Enforce top level describe

See original GitHub issue

Hello everyone,

Jest, and most testing library, let you write and organise your tests as you want, which is good but it can become a mess with large testing codebase. (Somewhat similar to #362 and no-standalone-expect ) It would be super cool to have a rule to enforce a top-level describe and make sure no test, it, beforeAll etc… can live outside this describe. Maybe it can be something like:

  • require-top-level-describe or
  • merged with no-standalone-expect => no-standalone: ['error', ['test', 'hook', 'expect']]

What do you think?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bodinsamuelcommented, Aug 30, 2019

Amazing, this is perfect. A big thanks to both of you 🙏

2reactions
thomaslombartcommented, Aug 29, 2019

Hi! That’s something I was looking for as well and I would like to give it a try by opening a PR. Does it work for you? 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enforce Policy Rule Description, Tag, and Audit Comment
Enforce audit comments for policy rules to capture the reason an administrator creates or modifies a rule. Requiring audit comments on policy rules...
Read more >
Guide to the Rulemaking Process - Federal Register
Go to Top. What is the purpose of the proposed rule? The proposed rule, or Notice of Proposed Rulemaking (NPRM), is the official...
Read more >
Code-style naming rules - .NET - Microsoft Learn
Sets the severity with which to enforce the naming rule. Set the associated value to one of the available severity levels. 1. Notes:...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
description (string) provides the short description of the rule in the rules ... a high-level overview of ESLint running time with all core...
Read more >
SEC Proposes Rules to Enhance and Standardize Climate ...
I believe the SEC has a role to play when there's this level of demand for consistent and comparable information that may affect...
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