view-duration.js 662 B

12345678910111213141516171819202122232425262728
  1. import { expectActiveRange } from './ViewDateUtils'
  2. describe('view duration', function() {
  3. pushOptions({
  4. defaultView: 'agenda',
  5. defaultDate: '2017-03-15'
  6. })
  7. describe('when specified as a week integer', function() {
  8. pushOptions({
  9. duration: { weeks: 1 }
  10. })
  11. it('aligns with start of week', function() {
  12. initCalendar()
  13. expectActiveRange('2017-03-12', '2017-03-19')
  14. })
  15. })
  16. describe('when specified as 7 days', function() {
  17. pushOptions({
  18. duration: { days: 7 }
  19. })
  20. it('aligns with start of week', function() {
  21. initCalendar()
  22. expectActiveRange('2017-03-15', '2017-03-22')
  23. })
  24. })
  25. })