govuk-frontend
govuk-frontend copied to clipboard
Expand existing testing documentation to define what we use unit tests (and other types) for
What
We currently have integration, end to end, snapshot, template tests and we're proposing adding unit tests too. We should make sure that our existing testing documentation covers what all of these things are and when it's appropriate to use each one.
Yes, definitely! I would love to do this, seems like a good first step before we introduce any tests for our component JS. It might be tricky to articulate in clear terms, but we can have a go. If in doubt, more tests is probably safer too, so as long as we make that clear somewhere we should be ok.
Why
To help developers in the team and contributors understand what tests they should be writing when they make changes or add new features.
Who needs to work on this
Developers, Tech Writer
Who needs to review this
Developers, Tech Writer
Done when
- [x] Look at how other open source repos deal with this, for inspiration?
- [ ] We have testing docs which explain the different types of testing we do
- [ ] We have some rough guidelines on when it's appropriate to use certain types of testing
- [ ] We might want to say something along the lines of 'more tests are better than none' in case anyone gets confused
- [ ] Follow up card(s) written for adding unit tests for our existing component JS, where appropriate
I've drafted something up for this - going to move it into Blocked for now while Claire is on leave.