module.js 541 B

123456789101112131415161718192021222324
  1. var Pikaday = require('../'),
  2. expect = require('expect.js');
  3. describe('Pikaday', function ()
  4. {
  5. 'use strict';
  6. it('should expose as a CommonJS module', function ()
  7. {
  8. expect(Pikaday).to.be.a('function');
  9. });
  10. it('should NOT leak to the global object', function ()
  11. {
  12. expect(window).to.not.have.property('Pikaday');
  13. });
  14. it('should be possible to create a new instance', function ()
  15. {
  16. expect(function () {
  17. new Pikaday();
  18. }).to.not.throwException();
  19. });
  20. });