Working in browser but broken unittests