8
0

googledocsnormalizer.js 1003 B

12345678910111213141516171819202122232425
  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 GoogleDocsNormalizer from '../../src/normalizers/googledocsnormalizer';
  6. // `execute()` of the google docs normalizer is tested with autogenerated normalization tests.
  7. describe( 'GoogleDocsNormalizer', () => {
  8. const normalizer = new GoogleDocsNormalizer();
  9. describe( 'isActive()', () => {
  10. it( 'should return true from google docs content', () => {
  11. expect( normalizer.isActive( '<p id="docs-internal-guid-12345678-1234-1234-1234-1234567890ab"></p>' ) ).to.be.true;
  12. } );
  13. it( 'should return false for microsoft word content', () => {
  14. expect( normalizer.isActive( '<meta name=Generator content="Microsoft Word 15"><p>Foo bar</p>' ) ).to.be.false;
  15. } );
  16. it( 'should return false for content form other sources', () => {
  17. expect( normalizer.isActive( '<p>foo</p>' ) ).to.be.false;
  18. } );
  19. } );
  20. } );