Skip to content

Commit 7d8cfa6

Browse files
committed
fix test
1 parent dd556bc commit 7d8cfa6

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

api/src/core/adapters/fetchExternalData.test.ts

+17-13
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,23 @@ describe("fetches software extra data (from different providers)", () => {
143143
expectToEqual(updatedSoftwareExternalDatas, []);
144144
});
145145

146-
it("fetches correctly the logoUrl from comptoir du libre", async () => {
147-
const softwareExternalDatas = await db.selectFrom("software_external_datas").selectAll().execute();
148-
expectToEqual(softwareExternalDatas, []);
146+
it(
147+
"fetches correctly the logoUrl from comptoir du libre",
148+
async () => {
149+
const softwareExternalDatas = await db.selectFrom("software_external_datas").selectAll().execute();
150+
expectToEqual(softwareExternalDatas, []);
149151

150-
await fetchAndSaveSoftwareExtraData(acceleroId, {});
152+
await fetchAndSaveSoftwareExtraData(acceleroId, {});
151153

152-
const results = await db.selectFrom("compiled_softwares").select("comptoirDuLibreSoftware").execute();
153-
expect(results).toHaveLength(1);
154-
expectToMatchObject(results[0]!.comptoirDuLibreSoftware, {
155-
name: "Acceleo",
156-
logoUrl: "https://comptoir-du-libre.org//img/files/Softwares/Acceleo/avatar/Acceleo.png"
157-
});
158-
}, 10_000);
154+
const results = await db.selectFrom("compiled_softwares").select("comptoirDuLibreSoftware").execute();
155+
expect(results).toHaveLength(1);
156+
expectToMatchObject(results[0]!.comptoirDuLibreSoftware, {
157+
name: "Acceleo",
158+
logoUrl: "https://comptoir-du-libre.org//img/files/Softwares/Acceleo/avatar/Acceleo.png"
159+
});
160+
},
161+
{ timeout: 10_000 }
162+
);
159163

160164
it(
161165
"gets software external data and saves it, and does not save other extra data if there is nothing relevant",
@@ -230,7 +234,7 @@ describe("fetches software extra data (from different providers)", () => {
230234
.executeTakeFirstOrThrow();
231235
expect(lastExtraDataFetchAt).toBeTruthy();
232236
},
233-
{ timeout: 10_000 }
237+
{ timeout: 20_000 }
234238
);
235239

236240
it(
@@ -546,6 +550,6 @@ describe("fetches software extra data (from different providers)", () => {
546550
}
547551
]);
548552
},
549-
{ timeout: 10_000 }
553+
{ timeout: 20_000 }
550554
);
551555
});

0 commit comments

Comments
 (0)