priorities.js 764 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. import priorities from '../src/priorities';
  6. describe( 'get', () => {
  7. it( 'should return correct value for string priority', () => {
  8. for ( const name in priorities ) {
  9. if ( priorities.hasOwnProperty( name ) && name != 'get' ) {
  10. expect( priorities.get( name ) ).to.equal( priorities[ name ] );
  11. }
  12. }
  13. } );
  14. it( 'should return value equal to normal for unrecognized string priority', () => {
  15. expect( priorities.get( 'foobar' ) ).to.equal( priorities.normal );
  16. } );
  17. it( 'should return passed number', () => {
  18. expect( priorities.get( 2 ) ).to.equal( 2 );
  19. } );
  20. } );