uid.js 545 B

1234567891011121314151617181920
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import uid from 'ckeditor5/utils/uid.js';
  6. describe( 'utils', () => {
  7. describe( 'uid', () => {
  8. it( 'should return different ids', () => {
  9. let id1 = uid();
  10. let id2 = uid();
  11. let id3 = uid();
  12. expect( id1 ).to.be.a( 'number' );
  13. expect( id2 ).to.be.a( 'number' ).to.not.equal( id1 ).to.not.equal( id3 );
  14. expect( id3 ).to.be.a( 'number' ).to.not.equal( id1 ).to.not.equal( id2 );
  15. } );
  16. } );
  17. } );