X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/3841606684ee3d233266ad490905076a3562842c..e8fcef96681425d431d03fa323747d7d6e61257c:/README.md?ds=sidebyside diff --git a/README.md b/README.md index e576933..3e0f099 100644 --- a/README.md +++ b/README.md @@ -2,36 +2,29 @@ A forum for the year 3000. -## Running the server - -This project provides a [docker compose][docker-compose] configuration -to easily run the service. In order to run the server, run -`docker-compose up` - ## What you will need to get started This project uses [node][node] for most of its development processes. Once you have node installed according to the instructions there, run `npm install` from the root of the project. -For local development serve the page by running `npm watch` from the +For local development serve the page by running `npm run dev` from the root of the project. -## Installing git hooks - -This repo contains a pre-commit git hook so indent will run before every -commit. Run `npm run setup-hooks` to install it. +This project depends on the [forum server][forum-server], so make sure +that's running before starting. -## Running migrations on the docker environment +## Testing -After building the app with docker compose, you can set up the database -with `docker exec forum_forum_1 npm run db:setup`. This will run -migrations and seed default data. +You can run tests with `npm test`. The tests use `testing-library`, `pact`, +and `jest`. -If you only want to run migrations, you should run -`docker exec forum_forum_1 npm run db:migrate` instead. +Here's some short guidelines: -If you only want to seed the database, you should run -`docker exec forum_forum_1 npm run db:seed` instead. +- Every component that receives props or changes state should be tested. +- Test expected outcomes, not implementation details. +- Avoid mocking unless it's an external call +- Stores that interact with the API should be tested using pact [node]: https://nodejs.org/en/ +[forum-server]: https://gitlab.com/rbdr/forum-server