# Unit Tests

I want to cover a topic I was SUPER intimidated by and never exposed to but now have come to love very much - unit tests! I’m going to explain the families or suites of unit tests we use in TidyBlocks rather than speak in abstractions. That way, if you want to add a new function or embelish on an existing block, you’ll have an outlined workflow for how to add the proper testing to make sure your code is doing what you think it should.

# In Conclusion

That said I still have some questions about overall unit test best practices: Should every function you write have its own unit test? We’ve also been addressing another question - How do you anticipate every use case of your functions; what happens when your unit test passes but your code still fails? by adding tests with the same name as an opened github issue, but are there better preventative measures one can take

##### Maya Gans
###### Data Scientist

Maya’s work as a Master’s student was focused in quantitative biology. She loves coding and is extremely passionate about data science and data visualization.