This article references features of the Mocha testing library available from
At LeaseLock, we take pride in our codebase’s ~93% test coverage. Despite being a small team, we rarely introduce new functionality without accompanying tests — this rule has served us well by keeping us away from silly mistakes. At the time of writing, we have just over 3,000 test cases in our test suite powered by Mocha and Chai.
While most of our tests are rapid-fire unit tests, there are a significant number of integration and end-to-end tests that hit our test database. …
As we gear ourselves up to eliminate security deposits from rental properties across the country, we are always looking for areas of improvement in our developer tooling in anticipation of a growing team.
In a previous blog post, we explained how we significantly improved our test suite runtime. Since then, we tackled another weak point of our test tooling: fixtures.
The core issue with our fixture setup is that we have to hand-craft them. Our fixtures are JSON files that we use to seed the database for our integration tests. In an effort to keep our fixtures directory somewhat reasonable…
Senior Software Engineer at LeaseLock