timeText.js 840 B

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