From 98ea1978e1de4ea3cf00b9bdb79698e861669419 Mon Sep 17 00:00:00 2001 From: tjtanjin Date: Fri, 4 Oct 2024 00:42:19 +0800 Subject: [PATCH] chore: Update test script commands --- .github/workflows/test.yml | 6 +++--- docs/DeveloperGuide.md | 2 +- package.json | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edbf0ebb..d7869c84 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: npm run start & - name: Run Unit Tests - run: npm run test + run: npm run unit:test integration-test: needs: unit-test @@ -65,7 +65,7 @@ jobs: npm run start & - name: Run Integration Tests - run: npm run cy:run + run: npm run int:test package-library: needs: integration-test @@ -163,4 +163,4 @@ jobs: - name: Run Library Tests run: | - npm run cy:run \ No newline at end of file + npm run int:test \ No newline at end of file diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 8aa38b0d..74ac18c4 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -252,7 +252,7 @@ Unit tests are done via [**Jest**](https://jestjs.io/), and you will find *jest. ### Integration Test -Integration tests are done via [**cypress**](https://www.cypress.io/), and you will find *cypress.config.js* and the *cypress* folder to be relevant. Currently, integration testing uses the default chatbot flow and settings for development that can be found within *App.tsx*. A series of automated actions are carried out and its results are verified by test cases. In future, it would be great to include a variety of flows/settings as testing against different setups will make the integration tests more comprehensive. For debugging purposes, you may also find it useful to run the test with `npm run cy:open`. +Integration tests are done via [**cypress**](https://www.cypress.io/), and you will find *cypress.config.js* and the *cypress* folder to be relevant. Currently, integration testing uses the default chatbot flow and settings for development that can be found within *App.tsx*. A series of automated actions are carried out and its results are verified by test cases. In future, it would be great to include a variety of flows/settings as testing against different setups will make the integration tests more comprehensive. For debugging purposes, you may also find it useful to run the test with `npm run int:test:open`. ### Compatibility Test diff --git a/package.json b/package.json index 01b5f8e9..dc14ef5d 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ "prepack": "tsc && vite build && node ./scripts/post-build.js", "start": "vite serve", "prepare": "husky install", - "test": "jest __tests__/", - "test:watch": "jest --watch __tests__/", - "test:coverage": "jest --coverage __tests__/", - "cy:open": "cypress open", - "cy:run": "cypress run", + "unit:test": "jest __tests__/", + "unit:test:watch": "jest --watch __tests__/", + "unit:test:coverage": "jest --coverage __tests__/", + "int:test:open": "cypress open", + "int:test": "cypress run", "validate:ssr": "node ./ssr/ssr-validate.js" }, "author": "tjtanjin",