From 742ce647068db8d50c6a1145322a9369c92f00cd Mon Sep 17 00:00:00 2001 From: ericv105 Date: Tue, 10 Jan 2023 14:01:36 -0500 Subject: [PATCH] updated website/README.md --- website/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/README.md b/website/README.md index 5198a820..3187f9d4 100644 --- a/website/README.md +++ b/website/README.md @@ -137,6 +137,16 @@ A few npm scripts are available for convenience: Read more in the [./cypress README](cypress/). +## Unit testing +Jest and React Testing Library are used for unit testing JS/TS/TSX code. + +- Store unit test files adjacent to the file being tested and have the filename + end with `.test.ts` for non-React code or `.test.tsx` for React code. +- `npm run jest`: automatically runs tests and watches for any relevant changes + to rerun tests. + +Read more in the [./src/README.md](src/README.md). + ## Best Practices When writing code for the website, we have a few best practices: