diff --git a/packages/slate/test/operations/apply/remove_text/cursor-inside-removed-text.js b/packages/slate/test/operations/apply/remove_text/cursor-inside-removed-text.js index a7dd0c7fa..cfc446704 100644 --- a/packages/slate/test/operations/apply/remove_text/cursor-inside-removed-text.js +++ b/packages/slate/test/operations/apply/remove_text/cursor-inside-removed-text.js @@ -2,15 +2,13 @@ import h from '../../../helpers/h' -export default function (change) { - return change.applyOperation({ - type: 'remove_text', - path: [0, 0], - offset: 2, - text: 'is is some text inside ', - marks: [] - }) -} +export default [{ + type: 'remove_text', + path: [0, 0], + offset: 2, + text: 'is is some text inside ', + marks: [] +}] export const input = ( diff --git a/packages/slate/test/operations/index.js b/packages/slate/test/operations/index.js index 7a74a4049..1615d21c6 100644 --- a/packages/slate/test/operations/index.js +++ b/packages/slate/test/operations/index.js @@ -26,9 +26,9 @@ describe('operations', async () => { it(test, async () => { const module = require(resolve(testDir, test)) const { input, output } = module - const fn = module.default + const operations = module.default const change = input.change() - fn(change) + change.applyOperations(operations) const opts = { preserveSelection: true, preserveData: true } const actual = change.value.toJSON(opts) const expected = output.toJSON(opts)