From 2e1cc7e2ab0142bea8fce09019b429063e30b1f5 Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Mon, 6 Dec 2021 12:44:49 -0600 Subject: [PATCH] Fix tests from quilljs/quill#3489 --- test/unit/core/selection.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/unit/core/selection.js b/test/unit/core/selection.js index 164f5f8bed..ef1d183286 100644 --- a/test/unit/core/selection.js +++ b/test/unit/core/selection.js @@ -1,6 +1,9 @@ +import Delta from 'quill-delta'; + import Selection, { Range } from '../../../core/selection'; import Cursor from '../../../blots/cursor'; import Emitter from '../../../core/emitter'; +import Editor from '../../../core/editor'; describe('Selection', function() { beforeEach(function() { @@ -632,12 +635,13 @@ describe('Selection', function() { }); it('empty container', function() { - const selection = this.initialize( - Selection, + const [editor, selection] = this.initialize( + [Editor, Selection], '
a
', ); - this.quill.updateContents([{ retain: 1 }, { insert: '\n' }]); + editor.applyDelta(new Delta([{ retain: 1 }, { insert: '\n' }])); expect(selection.getBounds(2, 0)).toEqual(null); + this.bounds = selection.getBounds(0, 1); }); }); });