Blame view

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