| 123456789101112131415161718192021222324252627282930313233 |
- /**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- import GoogleDocsNormalizer from '../../src/normalizer/googledocsnormalizer';
- // exec() of the google docs normalizer is tested with autogenerated normalization tests.
- describe( 'GoogleDocsNormalizer', () => {
- const normalizer = new GoogleDocsNormalizer();
- describe( 'isActive()', () => {
- describe( 'correct data set', () => {
- it( 'should be active for google docs data', () => {
- const gDocs = '<p id="docs-internal-guid-12345678-1234-1234-1234-1234567890ab"></p>';
- expect( normalizer.isActive( gDocs ) ).to.be.true;
- } );
- } );
- describe( 'wrong data set', () => {
- [
- '<p>foo</p>',
- '<meta name=Generator content="Microsoft Word 15"><p>Foo bar</p>',
- '<meta name=Generator content="Microsoft Word 15">'
- ].forEach( ( htmlString, index ) => {
- it( `should be inactive for: #${ index } data set`, () => {
- expect( normalizer.isActive( htmlString ) ).to.be.false;
- } );
- } );
- } );
- } );
- } );
|