Commit d15c6b83 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 271b9658 8b460204
...@@ -49,10 +49,11 @@ describe('Issue Due Date component', () => { ...@@ -49,10 +49,11 @@ describe('Issue Due Date component', () => {
it('should render month and day for other dates', () => { it('should render month and day for other dates', () => {
date.setDate(date.getDate() + 17); date.setDate(date.getDate() + 17);
vm = createComponent(date); vm = createComponent(date);
const today = new Date();
const isDueInCurrentYear = today.getFullYear() === date.getFullYear();
const format = isDueInCurrentYear ? 'mmm d' : 'mmm d, yyyy';
expect(vm.$el.querySelector('time').textContent.trim()).toEqual( expect(vm.$el.querySelector('time').textContent.trim()).toEqual(dateFormat(date, format, true));
dateFormat(date, 'mmm d', true),
);
}); });
it('should contain the correct `.text-danger` css class for overdue issue', () => { it('should contain the correct `.text-danger` css class for overdue issue', () => {
......
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