Skip to content

Enhancement: Add the ability to skip valid or invalid tests #7481

Closed
@azat-io

Description

@azat-io

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

rule-tester

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

I would like to be able to skip valid or invalid scenarios in some tests. In some cases, such examples are simply not needed.

Fail

import noLetRule from '../rule/no-let'

ruleTester.run(
  `disallow to use let`,
  rule,
  {
    valid: [],
    invalid: [`let a = 1`],
  },
)

This test is currently crashing with an error: Error: No test found in suite valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: rule-testerIssues related to the @typescript-eslint/rule-tester package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions