Refactor to fix illegal invocation.  Tests currently fail on perf.now due to sinon inability to mock.
Switched to duo-test