React-Style-Guide

A Reactjs coding style guide

This project is maintained by LinuxDevil

The name of the test should reveal its intention

When a test fails, its name is the first indication of what may have gone wrong.

Bad:

describe('Calendar', () => {
  it('2/29/2020', () => {
    // ...
  });

  it('throws', () => {
    // ...
  });
});

Good:

describe('Calendar', () => {
  it('should handle leap year', () => {
    // ...
  });

  it('should throw when format is invalid', () => {
    // ...
  });
});