mapsequal.js 601 B

12345678910111213141516171819202122232425
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. import mapsEqual from '/ckeditor5/utils/mapsequal.js';
  7. describe( 'utils', () => {
  8. describe( 'mapsEqual', () => {
  9. it( 'should return true if maps have exactly same entries (order of adding does not matter)', () => {
  10. let mapA = new Map();
  11. let mapB = new Map();
  12. mapA.set( 'foo', 'bar' );
  13. mapA.set( 'abc', 'xyz' );
  14. mapB.set( 'abc', 'xyz' );
  15. mapB.set( 'foo', 'bar' );
  16. expect( mapsEqual( mapA, mapB ) ).to.be.true;
  17. } );
  18. } );
  19. } );