tests: Correct the spelling of 'caret'.

This commit is contained in:
Karl Stolley 2023-07-31 13:35:07 -05:00
parent 6632eca2dc
commit 73fbca7ae9
No known key found for this signature in database
GPG Key ID: DB405205CD28EF88
1 changed files with 4 additions and 4 deletions

View File

@ -162,9 +162,9 @@ run_test("replace_syntax", ({override}) => {
assert.equal(old_syntax, "a");
assert.equal(new_syntax(), "A");
});
let prev_carat = $textbox.caret();
let prev_caret = $textbox.caret();
compose_ui.replace_syntax("a", "A", $textbox);
assert.equal(prev_carat, $textbox.caret());
assert.equal(prev_caret, $textbox.caret());
override(text_field_edit, "replace", (elt, old_syntax, new_syntax) => {
assert.equal(elt, "textarea");
@ -176,9 +176,9 @@ run_test("replace_syntax", ({override}) => {
// and that on replacing with a different length string, the
// cursor is shifted accordingly as expected
$textbox.caret(5);
prev_carat = $textbox.caret();
prev_caret = $textbox.caret();
compose_ui.replace_syntax("Bca", "$$\\pi$$", $textbox);
assert.equal(prev_carat + "$$\\pi$$".length - "Bca".length, $textbox.caret());
assert.equal(prev_caret + "$$\\pi$$".length - "Bca".length, $textbox.caret());
});
run_test("compute_placeholder_text", () => {