From f6c05b89acd02064f947fca6ac0b24d8b22e7dc8 Mon Sep 17 00:00:00 2001 From: VictorJorgeFGA Date: Sun, 22 Sep 2024 18:02:49 -0300 Subject: [PATCH] test: try to fix test timezone --- src/app/__tests__/cardMetrica.spec.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/__tests__/cardMetrica.spec.tsx b/src/app/__tests__/cardMetrica.spec.tsx index fc77129..d0d0807 100644 --- a/src/app/__tests__/cardMetrica.spec.tsx +++ b/src/app/__tests__/cardMetrica.spec.tsx @@ -8,7 +8,7 @@ import database from '../db'; jest.mock('../db', () => ({ get: jest.fn(() => ({ query: jest.fn().mockReturnValue({ - fetch: jest.fn(() => Promise.resolve([{ valor: 80, dataHora: '2024-09-18T12:00:00Z' }])), + fetch: jest.fn(() => Promise.resolve([{ valor: 80, dataHora: '2024-09-18T12:00:00-03:00' }])), }), })), })); @@ -184,7 +184,7 @@ describe('CardMetrica Component', () => { const { getByText } = render(); await waitFor(() => { - expect(getByText('18/09/2024 às 09:00')).toBeTruthy(); + expect(getByText('18/09/2024 às 12:00')).toBeTruthy(); }); });