Skip to content

Commit

Permalink
fix: expected by snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Oct 13, 2023
1 parent f088cfd commit f6defc4
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 143 deletions.

Large diffs are not rendered by default.

131 changes: 0 additions & 131 deletions targets/ingester/src/lib/fetchContributions/__tests__/expected.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
jest.mock("../ContributionRepository");
jest.mock("../AgreementRepository");
import { fetchContributions, fetchFicheSPIdsFromContributions } from "../index";
import ExpectedOutput from "./expected.json";

describe("ContributionRepository", () => {
test("fetchContribution should return all contributions with the expected format", async () => {
const result = await fetchContributions();
expect(result).toEqual(ExpectedOutput);
expect(result).toMatchSnapshot();
});

test("fetchFicheSPIdsFromContributions should return all fiche SP ids from Published contributions", async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
[
{
"agreementsWithAnswer": [
"0016",
"0044",
"0086",
"1480"
],
"agreementsWithAnswer": ["0016", "0044", "0086", "1480"],
"answer": {
"content": {
"date": "26/12/2022",
Expand Down Expand Up @@ -66,16 +61,20 @@
"url": "https://legifrance.gouv.fr/conv_coll/id/KALIARTI000005849379/?idConteneur=KALICONT000005635624"
},
{
"title": "Avenant n°114 du 19 mars 2021, article 2.1."
"title": "Avenant n°114 du 19 mars 2021, article 2.1.",
"url": null
},
{
"title": "Avenant n°86 du 19 mars 2021, article 2.1."
"title": "Avenant n°86 du 19 mars 2021, article 2.1.",
"url": null
},
{
"title": "Avenant n°94 du 19 mars 2021, article 3.1."
"title": "Avenant n°94 du 19 mars 2021, article 3.1.",
"url": null
},
{
"title": "Avenant n°96 du 19 mars 2021, article 3.1."
"title": "Avenant n°96 du 19 mars 2021, article 3.1.",
"url": null
}
]
},
Expand Down

0 comments on commit f6defc4

Please sign in to comment.