Change Date.now() to (new Date()).getTime() in test