hunk.code_window:               const change = input.change()
                 fn(change)
                 const opts = { preserveSelection: true, preserveData: true }
                 const actual = change.value.toJSON(opts)
                 const expected = output.toJSON(opts)
                 assert.deepEqual(actual, expected)
  
hunk.labels: keep replace keep keep keep keep
hunk.after_edit:               change.applyOperations(operations)
  
hunk.file_path: packages/slate/test/operations/index.js
hunk.type: replace
file: /** @jsx h */
  
  import h from '../../helpers/h'
  
  export const schema = {
    blocks: {
      paragraph: {},
      quote: {
        nodes: [
          { types: ['paragraph'], max: 1 },
        ],
        normalize: (change, reason, { node, child, index }) => {
          if (reason == 'child_unknown') {
            const previous = node.getPreviousSibling(child.key)
            const offset = previous.nodes.size
            child.nodes.forEach((n, i) => change.moveNodeByKey(n.key, previous.key, offset + i, { normalize: false }))
            change.removeNodeByKey(child.key)
          }
        }
      }
    }
  }
  
  export const input = (
    <value>
      <document>
        <quote>
          <paragraph>
            one
          </paragraph>
          <paragraph>
            two
          </paragraph>
        </quote>
      </document>
    </value>
  )
  
  export const output = (
    <value>
      <document>
        <quote>
          <paragraph>
            onetwo
          </paragraph>
        </quote>
      </document>
    </value>
  )
  