Skip to content

Commit

Permalink
use valid segment strings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siltomato committed Feb 24, 2025
1 parent a7f4af5 commit 7914f88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('DisableHtmlClipboard', () => {
clipboard = new DisableHtmlClipboard(quill, { textComponent: instance(textComponentMock) });

mockRange = { index: 5, length: 0 };
mockFormat = { segment: 'verse-1', bold: true };
mockFormat = { segment: 'verse_1_1', bold: true };
});

describe('onCapturePaste', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ describe('Quill history', () => {
{
name: 'commenter selection removal',
input: new Delta().insert('text', {
segment: 'verse-1',
segment: 'verse_1_1',
'highlight-segment': true,
'commenter-selection': true
}),
expectedAttrs: {
segment: 'verse-1',
segment: 'verse_1_1',
'highlight-segment': true,
'commenter-selection': null
}
},
{
name: 'default highlight segment',
input: new Delta().insert('text', {
segment: 'verse-1',
segment: 'verse_1_1',
'commenter-selection': true
}),
expectedAttrs: {
segment: 'verse-1',
segment: 'verse_1_1',
'highlight-segment': false,
'commenter-selection': null
}
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('Quill history', () => {
});

it('should clean up highlighting during undo', () => {
const delta = new Delta().insert('text', { segment: 'verse-1' });
const delta = new Delta().insert('text', { segment: 'verse_1_1' });
history.stack.undo = [{ delta, range: { index: 0, length: 4 } }];

history.change('undo', 'redo');
Expand Down

0 comments on commit 7914f88

Please sign in to comment.