function defineTests() {

    it('is invalid when crap text', function(done) {
      initCalendar({
        schedulerLicenseKey: '<%= versionReleaseDate %>',
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })

      // just to see if it compiles with schedulerLicenseKey
      let calendar = new Calendar(document.getElementById('cal'), {
        schedulerLicenseKey: '<%= versionReleaseDate %>'
      })
      expect(calendar).toBeTruthy()
    })

    it('is invalid when purchased more than a year ago', function(done) {
      initCalendar({
        schedulerLicenseKey: '1234567890-fcs-1273017600', // purchased on 2010-05-05
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })
    })

    it('is valid when purchased less than a year ago', function(done) {
      initCalendar({
        schedulerLicenseKey: '1234567890-fcs-1275868800', // purchased on 2010-06-07
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })

    it('is invalid when not 10 digits in random ID', function(done) {
      initCalendar({
        schedulerLicenseKey: '123456789-fcs-1275868800', // purchased on 2010-06-07
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })
    })

    it('is valid when Creative Commons', function(done) {
      initCalendar({
        schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })

    it('is valid when GPL', function(done) {
      initCalendar({
        schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })
  }
// FYI: _eventsPositioned guarantees that view's skeleton has been rendered and sized
_eventsPositioned guarantees that view's skeleton has been rendered and sized
_eventsPositioned guarantees that view ' s skeleton has been rendered and sized
function defineTests() {
    it('is invalid when crap text', function(done) {
      initCalendar({
        schedulerLicenseKey: '<%= versionReleaseDate %>',
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })
      let calendar = new Calendar(document.getElementById('cal'), {
        schedulerLicenseKey: '<%= versionReleaseDate %>'
      })
      expect(calendar).toBeTruthy()
    })
    it('is invalid when purchased more than a year ago', function(done) {
      initCalendar({
        schedulerLicenseKey: '1234567890-fcs-1273017600', 
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })
    })
    it('is valid when purchased less than a year ago', function(done) {
      initCalendar({
        schedulerLicenseKey: '1234567890-fcs-1275868800', 
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })
    it('is invalid when not 10 digits in random ID', function(done) {
      initCalendar({
        schedulerLicenseKey: '123456789-fcs-1275868800', 
        _eventsPositioned() {
          expectIsValid(false)
          done()
        }
      })
    })
    it('is valid when Creative Commons', function(done) {
      initCalendar({
        schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })
    it('is valid when GPL', function(done) {
      initCalendar({
        schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
        _eventsPositioned() {
          expectIsValid(true)
          done()
        }
      })
    })
  }
function defineTests ( ) { it ( 'is invalid when crap text' , function ( done ) { initCalendar ( { schedulerLicenseKey : '<%= versionReleaseDate %>' , _eventsPositioned ( ) { expectIsValid ( false ) done ( ) } } ) let calendar = new Calendar ( document . getElementById ( 'cal' ) , { schedulerLicenseKey : '<%= versionReleaseDate %>' } ) expect ( calendar ) . toBeTruthy ( ) } ) it ( 'is invalid when purchased more than a year ago' , function ( done ) { initCalendar ( { schedulerLicenseKey : '1234567890-fcs-1273017600' , _eventsPositioned ( ) { expectIsValid ( false ) done ( ) } } ) } ) it ( 'is valid when purchased less than a year ago' , function ( done ) { initCalendar ( { schedulerLicenseKey : '1234567890-fcs-1275868800' , _eventsPositioned ( ) { expectIsValid ( true ) done ( ) } } ) } ) it ( 'is invalid when not 10 digits in random ID' , function ( done ) { initCalendar ( { schedulerLicenseKey : '123456789-fcs-1275868800' , _eventsPositioned ( ) { expectIsValid ( false ) done ( ) } } ) } ) it ( 'is valid when Creative Commons' , function ( done ) { initCalendar ( { schedulerLicenseKey : 'CC-Attribution-NonCommercial-NoDerivatives' , _eventsPositioned ( ) { expectIsValid ( true ) done ( ) } } ) } ) it ( 'is valid when GPL' , function ( done ) { initCalendar ( { schedulerLicenseKey : 'GPL-My-Project-Is-Open-Source' , _eventsPositioned ( ) { expectIsValid ( true ) done ( ) } } ) } ) }
FYI: _eventsPositioned guarantees that view's skeleton has been rendered and sized
FYI : _eventsPositioned guarantees that view ' s skeleton has been rendered and sized
// just to see if it compiles with schedulerLicenseKey // purchased on 2010-05-05 // purchased on 2010-06-07 // purchased on 2010-06-07