Integration testing for React Application

Getting Started

Even if the bread and butter is not what the components renders in real time, this is a real project. So if you want to look at it, you can do it this way

First, install the dependencies

npm ci

Then you can run the project either in dev mode or production mode

# dev mode
npm run dev

# production mode
npm run build && npm run start

Open http://localhost:3000 with your browser to see the result.

Tests, typecheck and linters

To run jest tests, first run npm ci if you haven't previously then

npm run test
# or
npm run test:watch

You can also via CLI test the TypeScript compliance:

npm run typecheck

Both ESLint & Prettier are setup in this project.

To lint the files just run

npm run lint

You can also fix improper code style syntax before linting doing

npm run lint:fix

Visual Code Studio integration

For Visual Code Studio users, the project comes with a workspace setting in order to format on save following Prettier and ESLint rules.

To do so, you need to install the following extension to your Visual Code Studio:

Possible iterations

To be written

Technical stack

This project has been bootstraped with LoicGoyet/hiring-test-boilerplate.

Main technologies

Tooling

Reviewee Guide

This section covers points to acknowledge when you use this project to deliver a technical test. If you are a reviewer, you can skip this part, tho it might give hints on configuration and workflows.

All the following instructions take for granted that you installed the dependencies first. See "Reviewer Guide > Getting Started" for more informations.

Getting started

  1. run gh repo clone LoicGoyet/hiring-test-boilerplate project-name
  2. run cd project-name
  3. commit an update of the NEXT_PUBLIC_COMPANY_NAME/NEXT_PUBLIC_APPLICANT_NAME environnement variables and this README.md title
  4. run git reset $(git commit-tree HEAD^{tree} -m "bootstrap project")
  5. run git remote set-url origin https://github.com/LoicGoyet/project-name.git
  6. run git push -u origin main
  7. run npm ci && npm run dev

Before sending

  1. Remove the "## Reviewee Guide" section
  2. Eventually complete the "## Technical stack" section
  3. Complete the "## Code architecture" section
  4. Complete the "## Possible iterations" section

Next.js

This project uses Next.js 12.1.0 and React 18.0.0 release candidate 0. Check out Next.js documentation for every features available.

If you want to rollback to a stable version of React:

npm install --save --save-exact react@17.0.2 react-dom@17.0.2

Then within next.config.js remove the experimental attribute.