Here's what happened after publishing my first article
This year I published my first article "How our team writes React tests and other stuff too" . What happened after sharing my content didn't follow the script I had envisioned. The results are not surprising; here is what happened.
- Viewership was lower than I expected
- No one commented
- Reddit removed my posts
- Sharing this content was useful for myself
- I gained valuable insights
- There is a great deal more for me to learn about writing & publishing online
How our team writes React tests and other stuff too
Have you ever worked in a codebase where each test file was different to the next? Different terminology and grouping of test scenarios; different usages of snapshot testing and react-testing-library.
The effect of this meant wasted time reading a full test file to understand its structure before adding another test case. Creating new tests involved making multiple decisions; should I copy the structure of an existing test or create a new one? Should I use snapshot tests?
We solved this problem by defining guidelines to follow, that make writing tests that are easy to read and write, and would reduced wasted time on decisions.