2
0

timeText.js 738 B

12345678910111213141516171819202122232425262728293031
  1. describe('the time text on events', function() {
  2. describe('in agendaWeek', function() {
  3. pushOptions({
  4. defaultView: 'agendaWeek',
  5. defaultDate: '2017-07-03',
  6. scrollTime: '00:00'
  7. });
  8. it('renders segs with correct local timezone', function() {
  9. initCalendar({
  10. timezone: 'local',
  11. timeFormat: 'h:mm Z',
  12. events: [
  13. { start: '2017-07-03T23:00:00', end: '2017-07-04T13:00:00' }
  14. ]
  15. });
  16. expect(
  17. TimeGridEventRenderUtils.getTimeTexts()
  18. ).toEqual([
  19. moment('2017-07-03T23:00:00').format('h:mm Z') + ' - ' +
  20. moment('2017-07-04T00:00:00').format('h:mm Z'),
  21. moment('2017-07-04T00:00:00').format('h:mm Z') + ' - ' +
  22. moment('2017-07-04T13:00:00').format('h:mm Z'),
  23. ]);
  24. })
  25. });
  26. });