Back to Mocha

Pending Tests

docs-next/src/content/docs/declaring/pending-tests.mdx

11.7.6557 B
Original Source

"Pending" — as in "someone should write these test cases eventually" — test-cases are those without a callback:

js
describe("Array", function () {
  describe("#indexOf()", function () {
    // pending test below
    it("should return -1 when the value is not present");
  });
});

Pending tests will be included in the test results and marked as pending. A pending test is not considered a failed test.

Read the inclusive tests section for an example of conditionally marking a test as pending via this.skip().