Skip to content

Commit

Permalink
Fix tests from slab#3489
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Rockwood committed Dec 6, 2021
1 parent 1d2b919 commit 2e1cc7e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/unit/core/selection.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -632,12 +635,13 @@ describe('Selection', function() {
});

it('empty container', function() {
const selection = this.initialize(
Selection,
const [editor, selection] = this.initialize(
[Editor, Selection],
'<table><tr><td data-row="a">a</td></tr></table>',
);
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);
});
});
});

0 comments on commit 2e1cc7e

Please sign in to comment.