Move Unit tests closer to Implementation

Our unit tests are placed in a global tests directory and this makes it harder to establish a consistent test convention. It also encourages bloated test files where we group tests for unrelated functionalities in the same place.

Unit tests run against specific lines of code. So it makes sense to place them right next to that code.

The proposal is recursively to have a __tests__ sub-directory inside every source-code directory.

A sample is shown below

my-app/
├─ src/
│  ├─ __tests__/
│  │  ├─ index.test.js
│  ├─ index.js
├─ package.json
├─ README.md
Assignee Loading
Time tracking Loading