提交 a6713065 编写于 作者: M Mike Greiling 提交者: Phil Hughes

Resolve "Transient karma failure on master for `Date time utils timeFor...

Resolve "Transient karma failure on master for `Date time utils timeFor returns remaining time when in the future`"
上级 5214e507
......@@ -16,6 +16,10 @@ import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
const date = new Date();
date.setFullYear(date.getFullYear() + 1);
// Add a day to prevent a transient error. If date is even 1 second
// short of a full year, timeFor will return '11 months remaining'
date.setDate(date.getDate() + 1);
expect(
gl.utils.timeFor(date),
).toBe('1 year remaining');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册