Skip to content

Commit

Permalink
Doco - Added info about tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
OudomMunint committed Aug 17, 2024
1 parent d85cbc0 commit 709786d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h2 align="center">
Studio Zed project made with React Js<br/>
A Studio Zed project made with React Js<br/>
Feel free to use it as a template for your own projects!<br/>
<a href="https://studiozed.netlify.app/" target="_blank">Visit Studio Zed!</a>

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
Expand Down Expand Up @@ -50,5 +51,21 @@ This project was built using these technologies.
- Run `serve -s build` to serve the optimized build.
- From the terminal, you can see the local address & network address to view the build, copy and paste it in your browser.

## Running tests
- Run `npm run test` to run tests.
- There are 1 test suite and 5 tests in total.
- Testing setup can be found in `setupTests.js` & all tests are in `App.test.js`.
- Tests are written using Jest & React Testing Library.
- All 5 Tests are currently integrated into the `CI/CD` pipeline.
- Example of when all tests pass:
```bash
PASS src/App.test.js
✓ Test home page content (50 ms)
✓ Find contact form (69 ms)
✓ Find form submit button (11 ms)
✓ Test web vitals (1 ms)
✓ Test AboutPage (15 ms)
```

## Known Issues
- Security issues found in dependencies but are low risk to this project, See dependabot alert [#26](https://github.com/OudomMunint/StudioZed-ReactJS/security/dependabot/26) and alert [#12](https://github.com/OudomMunint/StudioZed-ReactJS/security/dependabot/12)
- Security issues found in dependencies but are low risk to this project, See dependabot alert [#26](https://github.com/OudomMunint/StudioZed-ReactJS/security/dependabot/26), alert [#12](https://github.com/OudomMunint/StudioZed-ReactJS/security/dependabot/12) and [#27](https://github.com/OudomMunint/StudioZed-ReactJS/security/dependabot/27).
2 changes: 1 addition & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test('Test web vitals', () => {
});

// Test if about page is rendered
test('Test if about page is rendered', () => {
test('Test AboutPage', () => {
render(<About />);
const aboutPage = About();
if (aboutPage != null) {
Expand Down

0 comments on commit 709786d

Please sign in to comment.