Summary
In this chapter, we’ve explored how to test the requestAnimationFrame
browser API. It’s not a straightforward process, and there are multiple tests that need to be written if you wish to be fully covered.
Nevertheless, you’ve seen that it is entirely possible to write automated tests for onscreen animation. The benefit of doing so is that the complex production code is fully documented via the tests.
In the next chapter, we’ll look at adding WebSocket communication into Spec Logo.