Skip to content

Files

Latest commit

 

History

History
24 lines (18 loc) · 496 Bytes

no-commented-out-tests.md

File metadata and controls

24 lines (18 loc) · 496 Bytes

Pattern: Commented out test

Issue: -

Description

Tests that are commented out may be forgotten and never uncommented. If a test is temporarily unnecessary, use .skip() or remove it entirely.

Examples

Example of incorrect code:

// describe('foo', () => {});
// it('foo', () => {});
// test('foo', () => {});
// test.skip('foo', () => {});

Example of correct code:

describe('foo', () => {});
test.skip('foo', () => {});
it('foo', () => {});