Skip to content

Comment out tests inside .each #8638

@chrisblossom

Description

@chrisblossom

🚀 Feature Proposal

I'd like to be able to comment out tests inside of a test.each.

Motivation

Sometimes I find it easier to debug certain tests when there aren't any excess logs. Right now I have to manually move them outside of a test.each, which is a hassle.

Example

test.each`
    example | expected
    ${1}    | ${1}
    // ${2}    | ${2}
`(
    '$example is equal to $expected',
    ({ example, expected }) => {
        console.log(example); // should only log 1
        expect(example).toEqual(expected);
    },
);

Pitch

Easily remove tests inside of a test.each will make development errors easier to debug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions