From 03a8589b5146da90c2057d2a680eaf654e99bd5c Mon Sep 17 00:00:00 2001
From: maxgfr <25312957+maxgfr@users.noreply.github.com>
Date: Tue, 3 Dec 2024 15:19:31 +0100
Subject: [PATCH] fix: glossary
---
.../src/workers/glossary/__mocks__/glossaryData.ts | 7 +++++++
.../workers/glossary/__tests__/addGlossaryContent.test.ts | 8 ++++++++
.../src/workers/glossary/explodeGlossaryTerms.ts | 4 ++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/targets/export-elasticsearch/src/workers/glossary/__mocks__/glossaryData.ts b/targets/export-elasticsearch/src/workers/glossary/__mocks__/glossaryData.ts
index 36236e50c..f4946c1ee 100644
--- a/targets/export-elasticsearch/src/workers/glossary/__mocks__/glossaryData.ts
+++ b/targets/export-elasticsearch/src/workers/glossary/__mocks__/glossaryData.ts
@@ -1,4 +1,11 @@
export const glossaryData = [
+ {
+ abbreviations: ["ZC"],
+ definition: "Definition de la zone commerciale",
+ term: "Zone commerciale",
+ variants: [],
+ references: [],
+ },
{
abbreviations: [],
definition:
diff --git a/targets/export-elasticsearch/src/workers/glossary/__tests__/addGlossaryContent.test.ts b/targets/export-elasticsearch/src/workers/glossary/__tests__/addGlossaryContent.test.ts
index ffd454bcf..ca655b3b6 100644
--- a/targets/export-elasticsearch/src/workers/glossary/__tests__/addGlossaryContent.test.ts
+++ b/targets/export-elasticsearch/src/workers/glossary/__tests__/addGlossaryContent.test.ts
@@ -542,6 +542,14 @@ describe("Glossary", () => {
`
Une zone commerciale
"; + expect(await addGlossaryContent(glossaryData, htmlContent)).toEqual( + `Une