iswindow.js 538 B

12345678910111213141516171819
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global window */
  6. import isWindow from '../../src/dom/iswindow';
  7. describe( 'isWindow()', () => {
  8. it( 'detects DOM Window', () => {
  9. expect( isWindow( window ) ).to.be.true;
  10. expect( isWindow( {} ) ).to.be.false;
  11. expect( isWindow( null ) ).to.be.false;
  12. expect( isWindow( undefined ) ).to.be.false;
  13. expect( isWindow( new Date() ) ).to.be.false;
  14. expect( isWindow( 42 ) ).to.be.false;
  15. } );
  16. } );