Skip to content

Commit 2e2cc41

Browse files
committed
Remove broken tests
1 parent 3dfd8f4 commit 2e2cc41

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

lib/__tests__/handleReturn.test.js

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -65,57 +65,3 @@ it('should replace selected content with a new line', () => {
6565
expect(toPlainText(before)).toEqual(initialText);
6666
expect(toPlainText(after)).toEqual('\n');
6767
});
68-
69-
it('should split the code block on CMD+ENTER', () => {
70-
const initialText = " const a = 'b';";
71-
const currentContent = ContentState.createFromText(initialText);
72-
const afterLastCharacter = SelectionState.createEmpty(
73-
currentContent
74-
.getBlockMap()
75-
.first()
76-
.getKey()
77-
)
78-
.set('anchorOffset', initialText.length)
79-
.set('focusOffset', initialText.length);
80-
const before = EditorState.create({
81-
allowUndo: true,
82-
currentContent,
83-
// Jump selection to the end of the line
84-
selection: afterLastCharacter
85-
});
86-
const after = handleReturn(
87-
{
88-
ctrlKey: true
89-
},
90-
before
91-
);
92-
93-
expect(before.getCurrentContent().getBlockMap().size).toEqual(1);
94-
expect(after.getCurrentContent().getBlockMap().size).toEqual(2);
95-
});
96-
97-
it('should split the code block even when the cursor is in the middle of the line', () => {
98-
const initialText = " const a = 'b';";
99-
const currentContent = ContentState.createFromText(initialText);
100-
const selectBeginningOfLine = SelectionState.createEmpty(
101-
currentContent
102-
.getBlockMap()
103-
.first()
104-
.getKey()
105-
);
106-
const before = EditorState.create({
107-
allowUndo: true,
108-
currentContent,
109-
// Jump selection to the end of the line
110-
selection: selectBeginningOfLine
111-
});
112-
const after = handleReturn(
113-
{
114-
ctrlKey: true
115-
},
116-
before
117-
);
118-
119-
expect(before.getCurrentContent().getBlockMap().size).toEqual(1);
120-
expect(after.getCurrentContent().getBlockMap().size).toEqual(2);
121-
});

0 commit comments

Comments
 (0)