mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-03 23:56:22 -07:00
Fix invalid event selection syntax
This commit is contained in:
parent
cd935ee32c
commit
605f0280b3
1 changed files with 4 additions and 2 deletions
|
@ -20,14 +20,16 @@ test("Checks BBCode application", () => {
|
||||||
$(document).on("keydown", handleKeydown);
|
$(document).on("keydown", handleKeydown);
|
||||||
let e = $.Event("keydown");
|
let e = $.Event("keydown");
|
||||||
e.ctrlKey = true;
|
e.ctrlKey = true;
|
||||||
e.which = e.keyCode = 85;
|
e.which = 85;
|
||||||
|
e.keyCode = 85;
|
||||||
$mockTextArea.text("text here");
|
$mockTextArea.text("text here");
|
||||||
$mockTextArea[0].selectionStart = 0;
|
$mockTextArea[0].selectionStart = 0;
|
||||||
$mockTextArea[0].selectionEnd = 4;
|
$mockTextArea[0].selectionEnd = 4;
|
||||||
$mockTextArea.trigger(e);
|
$mockTextArea.trigger(e);
|
||||||
expect($mockTextArea.text()).toEqual("[u]text[/u] here");
|
expect($mockTextArea.text()).toEqual("[u]text[/u] here");
|
||||||
|
|
||||||
e.which = 66 = e.keyCode = 66;
|
e.which = 66;
|
||||||
|
e.keyCode = 66;
|
||||||
$mockTextArea[0].selectionStart = 12;
|
$mockTextArea[0].selectionStart = 12;
|
||||||
$mockTextArea[0].selectionEnd = 16;
|
$mockTextArea[0].selectionEnd = 16;
|
||||||
$mockTextArea.trigger(e);
|
$mockTextArea.trigger(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue