Refine unit tests with proxyquire