Here’s a simple chat app I created as an example of using (hooks flavoured) React with Firebase, all in TypeScript. It’s a little like the YouTube superchat thing, whereby everyone can log in with single click Google authentication and all chat to each other.
Continue reading Chat app in React (hooks)Tag Archives: unit testing
How to verify that something implements an interface with Mockito
If you want to write a unit test which verifies that something implements a particular interface, or extends a particular class, here’s how…
Continue reading How to verify that something implements an interface with Mockito
Loan Shark – fast object pooling utility
A couple of years ago, I created an object pooling utility for a games project I was building in AS3. Since then, I’ve used it quite a few times, in order to speed up apps and improve resource management, easing the load on the garbage collector by reusing objects instead of recreating them. Continue reading Loan Shark – fast object pooling utility
Dependency Injection by Extension pattern
The problem
You need to use some kind of Dependency Injection (DI for short) to provision some System Under Test (SUT for short) in tests you’re writing, but can’t or don’t want to use a DI framework to do so.
Alternative titles for this post include:
- Dependency Injection without a Dependency Injection framework
- Why misusing the default namespace for tests is evil
- Make code more testable without completely messing it up
You must be logged in to post a comment.