From: Stas Vilchik Date: Wed, 2 Jan 2019 11:14:36 +0000 (+0100) Subject: fix DateInput test X-Git-Tag: 7.6~193 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=138171d657c57fe015c4dcc4be996973f87f5365;p=sonarqube.git fix DateInput test --- diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx index 1bbeb268e09..714ea80472d 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx @@ -35,6 +35,10 @@ jest.mock('../../lazyLoad', () => ({ } })); +beforeAll(() => { + Date.prototype.getFullYear = jest.fn().mockReturnValue(2018); // eslint-disable-line no-extend-native +}); + const dateA = parseDate('2018-01-17T00:00:00.000Z'); const dateB = parseDate('2018-02-05T00:00:00.000Z');