我需要为以下功能创建一个单元测试:
export default date => {
const dateInMs = new Date(date).getTime(); // UTC date
const clientDate = new Date();
// timezone offset is in minutes therefore it is being converted to milliseconds
const offset = clientDate.getTimezoneOffset() * 60 * 1000;
return new Date(dateInMs - offset).toISOString();
};

我知道我应该按以下格式通过测试日期
2017-07-01T00:00:00+00:00