Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong committed Jun 11, 2024
1 parent 597341b commit 773f70f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1005,4 +1005,31 @@ describe('getListTypeStyle', () => {
};
runTest(model, undefined);
});

it('"Constructor" should not trigger list', () => {
const model: ContentModelDocument = {
blockGroupType: 'Document',
blocks: [
{
blockType: 'Paragraph',
segments: [
{
segmentType: 'Text',
text: 'constructor',
format: {},
},
{
segmentType: 'SelectionMarker',
isSelected: true,
format: {},
},
],
format: {},
},
],
format: {},
};

runTest(model, undefined);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,18 @@ describe('transformFraction', () => {
};
runTest(segment, paragraph, { canUndoByBackspace: true } as any, false);
});

it('"constructor"', () => {
const segment: ContentModelText = {
segmentType: 'Text',
text: 'constructor',
format: {},
};
const paragraph: ContentModelParagraph = {
blockType: 'Paragraph',
segments: [segment],
format: {},
};
runTest(segment, paragraph, { canUndoByBackspace: true } as any, false);
});
});

0 comments on commit 773f70f

Please sign in to comment.