Skip to content

Commit

Permalink
Fixing unprecise expect call in test
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelMH1 committed May 2, 2024
1 parent 2dccb98 commit 4018f2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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');
});
});

Expand Down

0 comments on commit 4018f2c

Please sign in to comment.