- Install the dependencies with
npm install
- Run the application with
npm start
-
Components contains all generic components that are shared across pages. They should be generic and reusable, and testable in isolation.
-
Pages contains our different application views. Generally any requests should be activated here so that any children components don't have to, e.g. If we have a 'User Details' view, we should dispatch our network requests for user information from here.
-
Styles consists global style files that should be made available across our application.
-
This project utilises Jest with React Testing Library (RTL), which are built into Create React App (CRA).
-
All component folders will have an associated test file within the same folder. Each component is tested independently (unit testing) to ensure they work in isolation and aren't affected by external factors(such as other components).
-
Any test that would use the 'render' function from RTL, use the 'customRender' function from testUtils.js. This adds routing by default so we can easily test components that include route/link logic.
- This project uses prettier and ESlint to increase code readability and consistency.