No skipped tests

JavaScript pattern

Disable skipping Jest tests without an explanation.


Apply with the Grit CLI
grit apply jest_no_skipped_tests

Forbidden

BEFORE
describe.skip('foo', () => {
  it('bar', () => {
    expect(true).toBe(true);
  });
});
AFTER
describe('foo', () => {
  it('bar', () => {
    expect(true).toBe(true);
  });
});

Comment explanation

If you include a comment explaining why the test is skipped, it will be allowed.

JS
// This test flakes on CI
describe.skip('foo', () => {
  it('bar', () => {
    expect(true).toBe(true);
  });
});