| 1234567891011121314151617181920212223242526272829303132333435 |
- /**
- * @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 MSWordNormalizer from '../../src/normalizer/mswordnormalizer';
- // `exec()` of the msword normalizer is tested with autogenerated normalization tests.
- describe( 'PasteFromOffice/normalizer/mswornormalizer', () => {
- const normalizer = new MSWordNormalizer();
- describe( 'isActive()', () => {
- describe( 'correct data set', () => {
- [
- '<meta name=Generator content="Microsoft Word 15"><p>Foo bar</p>',
- '<meta name=Generator content="Microsoft Word 15">'
- ].forEach( ( htmlString, index ) => {
- it( `should be active for: #${ index } data set`, () => {
- expect( normalizer.isActive( htmlString ) ).to.be.true;
- } );
- } );
- } );
- describe( 'wrong data set', () => {
- [
- '<p>foo</p>',
- '<p id="docs-internal-guid-12345678-1234-1234-1234-1234567890ab"></p>'
- ].forEach( ( htmlString, index ) => {
- it( `should be inactive to for: #${ index } data set`, () => {
- expect( normalizer.isActive( htmlString ) ).to.be.false;
- } );
- } );
- } );
- } );
- } );
|