Skip to content

Commit

Permalink
chore: Update test script commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Oct 3, 2024
1 parent 9678912 commit 98ea197
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -163,4 +163,4 @@ jobs:
- name: Run Library Tests
run: |
npm run cy:run
npm run int:test
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 98ea197

Please sign in to comment.