Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pending tests in Jest?

Does Jest offer any sort of "pending test" like those in Mocha?

Mocha's pending tests let us write placeholder tests which are helpful when designing a test suite:

describe('pending tests', function() {
  it('should be a real test someday');
});

Pending tests aren't converted by jest-codemods and pass through unchanged.

like image 495
joemaller Avatar asked Sep 05 '25 03:09

joemaller


1 Answers

Since the answers above were given this has changed. .skip is technically not a pending test. Jest now provides test.todo("description") without the callback to declare a test is yet to be written (ref).

like image 50
Ernesto Avatar answered Sep 07 '25 21:09

Ernesto