diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-28 09:28:22 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-28 09:28:22 +0200 |
| commit | d3627833f2fc09b5388999265a3ab203f54fc750 (patch) | |
| tree | e4ff23cd28d2b772c93d80abe9d64b21ee85f585 | |
| parent | 1ea0e90c2f6ad856c85d68c514a65affcd5b31ea (diff) | |
Add testing documentation to README.md
| -rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -7,7 +7,7 @@ The user-facing component of the OpenDC stack, allowing users to build and inter ## Get Up and Running -*Looking for the full OpenDC stack? Check out [the main OpenDC repo](https://github.com/atlarge-research/opendc) for instructions on how to set up a Docker container with all of OpenDC, without the hassle of running each of the components manually.* +Looking for the full OpenDC stack? Check out [the main OpenDC repo](https://github.com/atlarge-research/opendc) for instructions on how to set up a Docker container with all of OpenDC, without the hassle of running each of the components manually. ### Installation @@ -37,6 +37,7 @@ yarn build **Note:** Perhaps this goes without saying, but for any functionality beyond visiting the entry page, a server backend running in the background is necessary. The easiest way to do this is to have an OpenDC docker container running, see [the main repo](https://github.com/atlarge-research/opendc) for more information on how to do this. + ## Architecture The codebase follows a standard React.js structure, with static assets being contained in the `public` folder, while dynamic components and their styles are contained in `src`. The app uses client-side routing (with `react-router`), meaning that the only HTML file needed to be served is a `index.html` file. @@ -68,3 +69,21 @@ Almost all state is kept in a central Redux store. State is kept there in an imm ### API Interaction The web-app needs to pull data in from the API of a backend running on a server. The functions that call routes are located in `src/api`. The actual logic responsible for calling these functions is contained in `src/sagas`. These API fetch procedures are written with the help of `redux-saga`. The [official documentation](https://redux-saga.js.org/) of `redux-saga` can be a helpful aid in understanding that part of the codebase. + + +## Tests + +Files containing tests can be recognized by the `.test.js` suffix. They are usually located right next to the source code they are testing, to make discovery easier. + +### Running all tests + +The following command runs all tests in the codebase. On top of this, it also watches the code for changes and reruns the tests when files are changed, automatically. + +```bash +yarn test +``` + + +## License + +The code is released under the MIT license. See `LICENSE.md`. |
