How to Skip Some Tests in Mocha?

Find out how you can ignore some tests in Mocha

You can use the skip() method (on describe() or it()) to ignore some tests:

  • In case of describe, it will ignore all tests in the describe block (which includes all nested describe and it functions);
  • In case of it, it will ignore the individual test.

For example:

describe.skip('...', function () {
  // all tests in this block are skipped...
it.skip('...', function () {
  // this test is skipped...

Hope you found this post useful. It was published . Please show your love and support by sharing this post.