Writing Better Test CLI Commands with Laravel and Artisan

Laravel’s Artisan CLI comes with a plethora of useful commands and functionality out of the box. Unfortunately, there’s one thing it doesn’t come with: an easy way to run different types of tests. On a recent project, our team had a desire to write Artisan commands that could run our tests, so we had one […]

The Five Habits of Maintainable Unit Tests

I like unit tests. They’re often the best documentation of a project’s behavior. They provide assurance that code modifications haven’t broken anything. But too many or poorly-written tests can have the undesirable effect of cementing code in place, making it more difficult to change. The following are some practical things I keep in mind when […]

Bye-Bye, Sinon – Hello, testdouble

UPDATE: Justin Searls, the author of testdouble.js sent me an email with some notes on this post. I’ve added some his comments below to provide some additional context. I’ve been working in JavaScript-land for the last little while, writing lots of Node.js code. Since I practice TDD, I’m always trying to keep my eye on […]