]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix UT test for UpgradeNotification branch-9.2
authorMathieu Suen <mathieu.suen@sonarsource.com>
Mon, 3 Jan 2022 10:35:33 +0000 (11:35 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 3 Jan 2022 20:02:53 +0000 (20:02 +0000)
server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx

index b99a923dd6b39f49cafd6c844a8806d62b0f84c4..fc5f347964d321617f7ab5ff049976d567547006 100644 (file)
@@ -38,7 +38,7 @@ jest.mock('../../../../api/system', () => {
 });
 
 function formatDate(date: Date): string {
-  return `${date.getFullYear()}-${date.getMonth()}-${date.getDay()}`;
+  return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
 }
 
 it('should render correctly', async () => {