Commit 50d4050d authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '33734-transient-karma-failure-on-master-for-date-time-utils-timefor-returns-remaining-time-when-in-the-future' into 'master'

Resolve "Transient karma failure on master for `Date time utils timeFor returns remaining time when in the future`"

Closes #33734

See merge request !12227
parents 5214e507 a6713065
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment