From 7f1315712897b1fb5b31f984b65461efefd92921 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Tue, 5 Aug 2025 14:39:38 -0700 Subject: [PATCH] add docs on testing (#833) --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a517f43..1395e9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,3 +23,39 @@ npm install ```sh npm start ``` + +## Testing + +### Unit tests + +```sh +npm test +``` + +### E2E tests + +Build the app for E2E testing: + +```sh +npm run pre:e2e +``` + +> Note: you only need to re-build the app when changing the app code. You don't need to re-build the app if you're just updating the tests. + +Run the whole e2e test suite: + +```sh +npm run e2e +``` + +Run a specific test file: + +```sh +npm run e2e e2e-tests/context_manage.spec.ts +``` + +Update snapshots for a test: + +```sh +npm run e2e e2e-tests/context_manage.spec.ts -- --update-snapshots +```