You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reducir la cantidad de actividades que se envían al cliente.
🧑💻 Notas para el desarrollo
Modificar el método conTurnos para que, por defecto, tenga un desde con el día de hoy. Con eso debería ser suficiente para que en el front no se muestren actividades que ya pasaron en ninguna vista. Si mal no recuerdo ya funciona así, pero verificar que devuelva todas las del día (sin importar la hora).
Para testear esto, habría que mockear la fecha actual - porque si no se haría un test dependiente del día en que se corre. Esto se logra así:
describe('Test',()=>{// to avoid race conditions between expected and actual date valuesbeforeAll(()=>{jest.useFakeTimers('modern');jest.setSystemTime(newDate(2020,01,01));// Obviamente acá puede ir cualquier fecha.});afterAll(()=>{// Back to reality...jest.useRealTimers();});
The text was updated successfully, but these errors were encountered:
✔️ Objetivos
Reducir la cantidad de actividades que se envían al cliente.
🧑💻 Notas para el desarrollo
Modificar el método
conTurnos
para que, por defecto, tenga undesde
con el día de hoy. Con eso debería ser suficiente para que en el front no se muestren actividades que ya pasaron en ninguna vista. Si mal no recuerdo ya funciona así, pero verificar que devuelva todas las del día (sin importar la hora).Para testear esto, habría que mockear la fecha actual - porque si no se haría un test dependiente del día en que se corre. Esto se logra así:
The text was updated successfully, but these errors were encountered: