Skip to content

Commit 9a34e42

Browse files
committed
bugfix: test setup
1 parent eddcd13 commit 9a34e42

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

vis/test/component/citationmodal.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ const getMockStoreData = (isStreamgraph: boolean) => {
4343
const getCitationText = (isStreamgraph: boolean) => {
4444
const mockStoreData = getMockStoreData(isStreamgraph);
4545
const citationTemplate = mockStoreData.localization.citation_template;
46+
const currentYear = new Date().getFullYear();
4647
const mockCitationStringData = {
47-
year: "2025",
48+
year: String(currentYear),
4849
type: isStreamgraph ? "Streamgraph" : "Knowledge Map",
4950
query: "climate change and impact",
5051
source: "http://localhost:3000/",
@@ -53,7 +54,7 @@ const getCitationText = (isStreamgraph: boolean) => {
5354

5455
return formatString(citationTemplate, mockCitationStringData).replace(
5556
" [].",
56-
"."
57+
".",
5758
);
5859
};
5960

@@ -68,7 +69,7 @@ const setup = (isStreamgraph: boolean) => {
6869
<LocalizationProvider localization={localization}>
6970
<CitationModal />
7071
</LocalizationProvider>
71-
</Provider>
72+
</Provider>,
7273
);
7374
};
7475

0 commit comments

Comments
 (0)