From 4018f2ca34c1066b59afe24b85a64ccd67f77550 Mon Sep 17 00:00:00 2001 From: Abel Date: Thu, 2 May 2024 18:17:41 +0200 Subject: [PATCH] Fixing unprecise expect call in test --- .../wikidataExtractor/wikidataextractor-service.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/questionsservice/wikidataExtractor/wikidataextractor-service.test.js b/questionsservice/wikidataExtractor/wikidataextractor-service.test.js index e2f3c17d..20971cdb 100644 --- a/questionsservice/wikidataExtractor/wikidataextractor-service.test.js +++ b/questionsservice/wikidataExtractor/wikidataextractor-service.test.js @@ -58,7 +58,7 @@ describe('Test the Wikidata Conexion', () => { await startJob(); expect(cron.schedule).toBeCalledWith(`*/30 * * * *`, expect.any(Function)); expect(fetch).toHaveBeenCalledWith(expect.stringContaining('https://query.wikidata.org/sparql?query='), expect.anything()); - expect(consoleLogSpy).toBeCalledWith(`Running a task every 30 minutes: ${Date()}`); + expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining('Running a task every 30 minutes:')); }); it('Should return an error', async () => { @@ -79,7 +79,7 @@ describe('Test the Wikidata Conexion', () => { await startJob(); expect(cron.schedule).toBeCalledWith(`*/30 * * * *`, expect.any(Function)); expect(fetch).toHaveBeenCalledWith(expect.stringContaining('https://query.wikidata.org/sparql?query='), expect.anything()); - expect(errorLogSpy).toBeCalledWith('Error al realizar la consulta a Wikidata:', 'Debería fallar'); + expect(errorLogSpy).toHaveBeenCalledWith('Error al realizar la consulta a Wikidata:', 'Debería fallar'); }); });