chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -20,7 +20,7 @@ describe('getRangeDirection', () => {
|
||||
it('should return "none" when the range start and end are the same', () => {
|
||||
const range = document.createRange();
|
||||
const div = document.createElement('div');
|
||||
document.body.appendChild(div); // 确保节点在 DOM 中
|
||||
document.body.appendChild(div); // Make sure the node is in the DOM
|
||||
range.setStart(div, 0);
|
||||
range.setEnd(div, 0);
|
||||
|
||||
@@ -30,11 +30,11 @@ describe('getRangeDirection', () => {
|
||||
|
||||
it('should return "forward" when the range is selected forwards', () => {
|
||||
const div = document.createElement('div');
|
||||
document.body.appendChild(div); // 确保节点在 DOM 中
|
||||
document.body.appendChild(div); // Make sure the node is in the DOM
|
||||
div.textContent = 'Test content';
|
||||
const range = document.createRange();
|
||||
range.setStart(div.firstChild as Node, 0);
|
||||
range.setEnd(div.firstChild as Node, 4); // 选择了 "Test"
|
||||
range.setEnd(div.firstChild as Node, 4); // Select "Test"
|
||||
|
||||
const direction = getRangeDirection(range);
|
||||
expect(direction).toBe('forward');
|
||||
|
||||
Reference in New Issue
Block a user