     )
   )
 
-  # describe('partitionChildren', ->
-
-  # )
+  describe('partitionChildren', ->
+    tests =
+      'multiple splits':
+        initial:  '<div><span>01</span><b>23</b></div>'
+        expected: '<div><span>0</span><span>1</span><b>2</b><b>3</b></div>'
+        offset: 1, length: 2, start: '1', end: '2'
+
+      'enclose':
+        initial:  '<div><b>01</b><i>23</i><u>45</u><s>67</s></div>'
+        expected: '<div><b>01</b><i>23</i><u>45</u><s>67</s></div>'
+        offset: 2, length: 4, start: '23', end: '45'
+
+    _.each(tests, (test, name) ->
+      it(name, ->
+        @container.innerHTML = test.initial
+        [start, end] = Quill.Utils.partitionChildren(@container.firstChild, test.offset, test.length)
+        expect.equalHTML(@container, test.expected)
+        expect(Quill.DOM.getText(start)).to.equal(test.start)
+        expect(Quill.DOM.getText(end)).to.equal(test.end)
+      )
+    )
+  )
 
   it('splitAncestors', ->
     @container.innerHTML = Quill.Normalizer.stripWhitespace('

    @container = $('#test-container').html('').get(0)
  )

  # describe('findDeepestNode', ->

  # )

  describe('getChildAtOffset', ->
    beforeEach( ->

    )
  )

  describe('splitChild', ->
    tests =
      'split middle':
        initial:  '<div><b>01</b><i>23</i></div>'
        expected: '<dib><b>0</b><b>1</b><i>23</i></div>'
        offset: 1, left: '0', right: '1', split: true
      'no split':
        initial:  '<div><b>01</b><i>23</i></div>'
        expected: '<div><b>01</b><i>23</i></div>'
        offset: 2, left: '01', right: '23', split: false
    _.each(tests, (test, name) ->
      it(name, ->
        @container.innerHTML = test.initial
        [left, right, split] = Quill.Utils.splitChild(@container.firstChild, test.offset)
        expect(Quill.DOM.getText(left)).to.equal(test.left)
        expect(Quill.DOM.getText(right)).to.equal(test.right)
        expect(test.split).to.equal(split)
      )
    )
  )

  describe('splitNode', ->
    tests =
      'unnecessary split before':
        initial:  '<b>Bold</b>'
        expected: '<b>Bold</b>'
        offset: 0, left: null, right: 'Bold', split: false
      'unnecessary split after':
        initial:  '<b>Bold</b>'
        expected: '<b>Bold</b>'
        offset: 4, left: 'Bold', right: null, split: false
      'text node':
        initial:  '<b>Bold</b>'
        expected: '<b>Bo</b><b>ld</b>'
        offset: 2, left: 'Bo', right: 'ld', split: true
      'child nodes':
        initial:  '<b><i>Italic</i><s>Strike</s></b>'
        expected: '<b><i>Italic</i></b><b><s>Strike</s></b>'
        offset: 6, left: 'Italic', right: 'Strike', split: true
      'child and text nodes':
        initial:  '<b><i>Italic</i></b>'
        expected: '<b><i>It</i></b><b><i>alic</i></b>'
        offset: 2, left: 'It', right: 'alic', split: true
      'split deep nodes':
        initial:  '
          <b>
            <i>
              <s>
                <u>One</u>
                <u>Two</u>
              </s>
              <s>Three</s>
            </i>
          </b>'
        expected: '
          <b>
            <i>
              <s>
                <u>On</u>
              </s>
            </i>
          </b>
          <b>
            <i>
              <s>
                <u>e</u>
                <u>Two</u>
              </s>
              <s>Three</s>
            </i>
          </b>'
        offset: 2, left: 'On', right: 'eTwoThree', split: true
      'force split':
        initial:  '<b>Bold</b>'
        expected: '<b>Bold</b><b></b>'
        offset: 4, left: 'Bold', right: '', split: true, force: true

    _.each(tests, (test, name) ->
      it(name, ->
        @container.innerHTML = Quill.Normalizer.stripWhitespace(test.initial)
        [left, right, split] = Quill.Utils.splitNode(@container.firstChild, test.offset, test.force)
        expect.equalHTML(@container, test.expected)
        leftText = if left then Quill.DOM.getText(left) else null
        rightText = if right then Quill.DOM.getText(right) else null
        expect(leftText).to.equal(test.left)
        expect(rightText).to.equal(test.right)
        expect(test.split).to.equal(split)
      )
    )
  )
