From 6c077550ba2b658e35aef76c18603cb3384b8040 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 26 Dec 2024 05:08:44 +0100 Subject: [PATCH] docs: add instructions for running tests (#2587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### ๐Ÿ”— Linked issue ### ๐Ÿ“š Description --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 292da181e..be833f377 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,20 @@ Now close and re-open the workspace. | pnpm prisma:studio | Explore data in the database using a visual editor. | | pnpm storybook | Start [Storybook](#ui-workflow-storybook) in your browser. | +### Running tests locally + +To run the tests locally, it's best to start the development server by running `pnpm dev`. +Then, in a separate terminal, set the environment variable `TEST_URL` to the URL of the development server (e.g., `http://localhost:3000`) + +```bash +# Linux +export TEST_URL=http://localhost:3000 +# Windows +$env:TEST_URL = "http://localhost:3000" +``` + +Then you can run the tests by executing `pnpm test`. + ### Workflow for editing the database schema 1. Prototype your new feature by making the necessary changes to `schema.prisma`.