Implemented bug test

This commit is contained in:
Николай Митин 2021-01-31 18:17:10 +03:00
parent baca852733
commit 263cc0856e
2 changed files with 3608 additions and 10 deletions

3598
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -101,6 +101,26 @@ export const testMultilineFormat = tc => {
])
}
/**
* @param {t.TestCase} tc
*/
export const testNotMergeEmptyLinesFormat = tc => {
const ydoc = new Y.Doc()
const testText = ydoc.getText('test')
testText.applyDelta([
{ insert: 'Text' },
{ insert: '\n', attributes: { title: true } },
{ insert: '\nText' },
{ insert: '\n', attributes: { title: true } }
])
t.compare(testText.toDelta(), [
{ insert: 'Text' },
{ insert: '\n', attributes: { title: true } },
{ insert: '\nText' },
{ insert: '\n', attributes: { title: true } }
])
}
/**
* @param {t.TestCase} tc
*/