mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 14:41:23 +02:00
Introduce annotations (#2747)
* first stab at removing leaves with tests passing * fixes * add iterables to the element interface * use iterables in more places * update examples to use iterables * update naming * fix tests * convert more key-based logic to paths * add range support to iterables * refactor many methods to use iterables, deprecate cruft * clean up existing iterables * more cleanup * more cleaning * fix word count example * work * split decoration and annotations * update examples for `renderNode` useage * deprecate old DOM-based helpers, update examples * make formats first class, refactor leaf rendering * fix examples, fix isAtomic checking * deprecate leaf model * convert Text and Leaf to functional components * fix lint and tests
This commit is contained in:
@@ -9,21 +9,4 @@ describe('slate-hyperscript', () => {
|
||||
const expected = Value.isValue(output) ? output.toJSON() : output
|
||||
assert.deepEqual(actual, expected)
|
||||
})
|
||||
|
||||
fixtures.skip(__dirname, 'decorations', ({ module }) => {
|
||||
const { input, output, expectDecorations } = module
|
||||
const actual = input.toJSON()
|
||||
const expected = Value.isValue(output) ? output.toJSON() : output
|
||||
assert.deepEqual(actual, expected)
|
||||
|
||||
expectDecorations.forEach((decoration, i) => {
|
||||
Object.keys(decoration).forEach(prop => {
|
||||
assert.deepEqual(
|
||||
decoration[prop],
|
||||
input.decorations.toJS()[i][prop],
|
||||
`decoration ${i} had incorrect prop: ${prop}`
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user