getDaysSinceDate.spec.tsx 374 B

1234567891011121314
  1. import getDaysSinceDate from 'sentry/utils/getDaysSinceDate';
  2. jest.mock('moment', () => {
  3. const moment = jest.requireActual('moment');
  4. // Jun 06 2022
  5. moment.now = jest.fn().mockReturnValue(1654492173000);
  6. return moment;
  7. });
  8. describe('getDaysSinceDate', function () {
  9. it('simple test', function () {
  10. expect(getDaysSinceDate('2022-05-11')).toBe(26);
  11. });
  12. });