mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 17:09:53 +02:00
Update isHistory
to match new interface. (#5197)
* Update `isHistory` to match new interface. This change merely preserves the original functionality and does not add verification of Batch's new `selectionBefore` property. * Add changeset.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import assert from 'assert'
|
||||
import { fixtures } from '../../../support/fixtures'
|
||||
import { createHyperscript } from 'slate-hyperscript'
|
||||
import { withHistory } from '..'
|
||||
import { History, withHistory } from '..'
|
||||
|
||||
describe('slate-history', () => {
|
||||
fixtures(__dirname, 'undo', ({ module }) => {
|
||||
@@ -12,6 +12,14 @@ describe('slate-history', () => {
|
||||
assert.deepEqual(editor.children, output.children)
|
||||
assert.deepEqual(editor.selection, output.selection)
|
||||
})
|
||||
|
||||
fixtures(__dirname, 'isHistory', ({ module }) => {
|
||||
const { input, run, output } = module
|
||||
const editor = withTest(withHistory(input))
|
||||
run(editor)
|
||||
const result = History.isHistory(editor.history)
|
||||
assert.strictEqual(result, output)
|
||||
})
|
||||
})
|
||||
|
||||
export const jsx = createHyperscript({
|
||||
|
Reference in New Issue
Block a user