I recently published this post on creating a game lobby system using Phoenix’s websockets. Here at Quick Left, we place a high value on our tests. This time around, I’ll be going over how to test the websocket code that we created in the previous post.
As with any development, test-driving features is the way to go in a Flux app. As I’ve been learning this technology, I’ve been collecting some of the less obvious patterns that make testing easier. In this post, we’ll take a look at some of these strategies, to make it easier for you to build the next big thing.
Testing is a vital part of any development process. Whether a project's authors are hoping for scalability, fewer bugs, or just code that stands the test of time, a solid test suite is essential.
It's all well and good writing tests, but how do you know that you've tested the code that matters? Did you cover the most important components? Did you test the sad path? The edge cases? What about the zero states?
Using Istanbul, you can generate a nice coverage report to answer these questions. In this article, we'll look at how to get it set up in a typical clientside JS project.
The other day at our company standup, I mentioned that I was eager to
read an article on Concurrency in Minitest
that was featured in Ruby Weekly. One of my
coworkers asked: "people still use Minitest?" My reply: "you mean you're not using Minitest yet?"
I love Minitest. It's small, lightweight, and ships with Ruby. It's used by respected programmers like Aaron Patterson, Katrina Owen, Sandi Metz, and of course, DHH. Here's a look at why Minitest remains a powerful and popular choice for testing Ruby code.
When it comes to contemporary web development, AngularJS is the new hotness. Its unique approach to HTML compilation and two-way data binding make it
an effective tool for efficiently building client-side web apps. But when it comes to the testing, many tutorials on the interwebs hand-wave testing. This article covers some of the "gotchas" you'll come across when trying to test Angular. Let's build our chops, so we can get into a "Red-Green-Refactor" flow when testing Angular.
- ← Previous
- Next →