Skip to content

Commit 417d96a

Browse files
docs: adding a testing ADR for frontend
1 parent 9b9fdff commit 417d96a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Title
2+
3+
Automated testing frontend
4+
5+
## Date proposed
6+
7+
02-19-2026
8+
9+
## Context
10+
11+
We can't have confidence that our product will continue to work when we change things without tests.
12+
13+
## Decision
14+
15+
We will use the following technologies to test:
16+
17+
1. [Cypress](https://www.cypress.io/) for end to end tests and api tests
18+
1. [Vitest](https://vitest.dev/) for unit/integration tests
19+
1. [MSW](https://mswjs.io/docs/getting-started/) for api mocking in unit/integration tests
20+
21+
We will mock as little as possible in our tests and [prefer integration tests over unit tests](https://kentcdodds.com/blog/write-tests). The bulk of our tests will be integration tests, because they provide the best performance to confidence ratio.
22+
23+
The purpose of our end to end tests will be to validate that the frontend is working with the backend properly, and that apis are working together properly. We don't need to test every edge case in our end to end tests, because using MSW allows us to test those edge cases in our integration tests.
24+
25+
The purpose of our tests is to give us confidence to make changes without breaking things. We will write enough tests that we can be confident in deploying changes without manual testing.
26+
27+
## Consequences
28+
29+
Contributors will need some time to learn the prescribed testing technologies. It will take more time to contribute to the repository.
30+
31+
We will be able to make changes without the fear of breaking things, and our code will be more reliable.

0 commit comments

Comments
 (0)