From d488f5a29f50335c31415a351fe64026cc44d47e Mon Sep 17 00:00:00 2001 From: maxgfr <25312957+maxgfr@users.noreply.github.com> Date: Wed, 3 Apr 2024 18:15:54 +0200 Subject: [PATCH] fix: tools --- .../prequalified/__tests__/generatePrequalified.test.ts | 4 +--- .../src/ingester/prequalified/generatePrequalified.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/targets/export-elasticsearch/src/ingester/prequalified/__tests__/generatePrequalified.test.ts b/targets/export-elasticsearch/src/ingester/prequalified/__tests__/generatePrequalified.test.ts index a096afa0d..6e5050171 100644 --- a/targets/export-elasticsearch/src/ingester/prequalified/__tests__/generatePrequalified.test.ts +++ b/targets/export-elasticsearch/src/ingester/prequalified/__tests__/generatePrequalified.test.ts @@ -44,7 +44,7 @@ jest.mock("../fetchPrequalified", () => ({ describe("generatePrequalified", () => { it("should return prequalified", async () => { - const result = await generatePrequalified(); + const result = await generatePrequalified(jest.fn()); expect(result).toEqual([ { @@ -56,7 +56,6 @@ describe("generatePrequalified", () => { metaDescription: "titlePrequalified", refs: [ { - breadcrumbs: [], cdtnId: "cdtnIdInformation", description: "descriptionInformation", id: "idInformation", @@ -65,7 +64,6 @@ describe("generatePrequalified", () => { title: "titleInformation", }, { - breadcrumbs: [], cdtnId: "cdtnIdContribution", description: "descriptionContribution", id: "idContribution", diff --git a/targets/export-elasticsearch/src/ingester/prequalified/generatePrequalified.ts b/targets/export-elasticsearch/src/ingester/prequalified/generatePrequalified.ts index 4cf77f2d9..954263621 100644 --- a/targets/export-elasticsearch/src/ingester/prequalified/generatePrequalified.ts +++ b/targets/export-elasticsearch/src/ingester/prequalified/generatePrequalified.ts @@ -30,7 +30,7 @@ export const generatePrequalified = async ( title: document.title, source: document.source, description: document.description || document.document.description, - breadcrumbs: getBreadcrumbs(document.cdtnId) ?? [], + breadcrumbs: getBreadcrumbs(document.cdtnId), url: document.url, icon: document.icon, action: document.action,