JavaScript unit testing boilerplate