no_commented_out_tests

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoCommentedOutTestsRule = rule.Rule{
	Name: "jest/no-commented-out-tests",
	Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
		text := ctx.SourceFile.Text()
		utils.ForEachComment(ctx.SourceFile.AsNode(), func(comment *ast.CommentRange) {
			if comment == nil {
				return
			}
			inner := commentInnerText(text, comment)
			if inner == "" || !commentedTestRegexp.MatchString(inner) {
				return
			}
			ctx.ReportRange(
				core.NewTextRange(comment.Pos(), comment.End()),
				buildCommentedTestsMessage(),
			)
		}, ctx.SourceFile)
		return rule.RuleListeners{}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL