mirror of
https://github.com/yjs/yjs.git
synced 2026-02-24 04:01:14 +01:00
Implemented bug test
This commit is contained in:
3598
package-lock.json
generated
3598
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user