]> source.dussan.org Git - sonarqube.git/commitdiff
fix DateInput test 3193/head
authorStas Vilchik <stas.vilchik@sonarsource.com>
Wed, 2 Jan 2019 11:14:36 +0000 (12:14 +0100)
committerSonarTech <sonartech@sonarsource.com>
Wed, 2 Jan 2019 19:21:02 +0000 (20:21 +0100)
server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx

index 1bbeb268e09a4ddec2d1295ebc3b4258a9c7670d..714ea80472d57e2d1fbc4a8e998da77229df64c9 100644 (file)
@@ -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');