bold.js 543 B

123456789101112131415161718
  1. import Scroll from '../../../blots/scroll';
  2. describe('Bold', function() {
  3. it('optimize and merge', function() {
  4. const scroll = this.initialize(
  5. Scroll,
  6. '<p><strong>a</strong>b<strong>c</strong></p>',
  7. );
  8. const bold = document.createElement('b');
  9. bold.appendChild(scroll.domNode.firstChild.childNodes[1]);
  10. scroll.domNode.firstChild.insertBefore(
  11. bold,
  12. scroll.domNode.firstChild.lastChild,
  13. );
  14. scroll.update();
  15. expect(scroll.domNode).toEqualHTML('<p><strong>abc</strong></p>');
  16. });
  17. });