Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Sep 15, 2016
1 parent 751125f commit 4f2ad7d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/unit/modules/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ import Quill from '../../../core';
describe('Clipboard', function() {
describe('events', function() {
beforeEach(function() {
this.event = {
clipboardData: {
getData: function() {},
setData: function() {}
},
preventDefault: function() {}
};
this.quill = this.initialize(Quill, '<h1>0123</h1><p>5<em>67</em>8</p>');
this.quill.setSelection(2, 5);
});

it('paste', function(done) {
this.event.clipboardData.types = ['text'];
spyOn(this.event.clipboardData, 'getData').and.returnValue('|');
this.quill.clipboard.container.innerHTML = '<strong>|</strong>';
this.quill.clipboard.onPaste(this.event);
this.quill.clipboard.onPaste({});
setTimeout(() => {
expect(this.quill.root).toEqualHTML('<p>01<strong>|</strong><em>7</em>8</p>');
expect(this.quill.getSelection()).toEqual(new Range(3));
Expand Down

0 comments on commit 4f2ad7d

Please sign in to comment.