import { RawAssertions } from '@ephox/agar'; import FragmentParser from 'tinymce/plugins/paste/core/FragmentParser'; import { UnitTest } from '@ephox/bedrock'; UnitTest.test('atomic.tinymce.plugins.paste.FragmentParserTest', function () { const testGetFragmentInfo = function () { RawAssertions.assertEq( 'Should be the input string and context body', { html: 'abc', context: 'body' }, FragmentParser.getFragmentInfo('abc') ); RawAssertions.assertEq( 'Should be the input string without fragment markers and context body', { html: 'abc', context: 'body' }, FragmentParser.getFragmentInfo('abc') ); RawAssertions.assertEq( 'Should be the input string without fragment markers and context body', { html: 'abc', context: 'body' }, FragmentParser.getFragmentInfo('abc') ); RawAssertions.assertEq( 'Should be the input string without fragment markers and contents before/after fragment markers', { html: 'abc', context: 'body' }, FragmentParser.getFragmentInfo('XabcY') ); RawAssertions.assertEq( 'Should be the input string without fragment markers and contents before/after fragment markers', { html: 'boldabcThis', context: 'body' }, FragmentParser.getFragmentInfo('
boldabcThis