Skip to content

Excluding second argument should not throw, but instead mark the test as skipped #6430

@javorosas

Description

@javorosas

💥 Regression Report

It is a common use case for many teams doing TDD to write the specs first (what the software should do)

it('should sum two numbers');

and implement the behavior later

it('should sum two numbers', () => {
  expect(sum(5, 4)).toBe(9);
});

sometimes these two tasks are even made by two different people.

#5558 introduced throwing an error if the second argument is missing, apparently lacking a proper discussion on the consequences of doing that change.

Last working version

Worked up to version: 22.4.2

Stopped working in version: 23.0.0

To Reproduce

Steps to reproduce the behavior:

Run jest for this test case:

it('should sum two numbers');

Expected behavior

0 tests passed
0 tests failed
1 test skipped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions