1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-03 19:56:22 -07:00

Fix invalid event selection syntax

This commit is contained in:
Eggbertx 2022-01-29 14:01:34 -08:00
parent cd935ee32c
commit 605f0280b3

View file

@ -20,14 +20,16 @@ test("Checks BBCode application", () => {
$(document).on("keydown", handleKeydown);
let e = $.Event("keydown");
e.ctrlKey = true;
e.which = e.keyCode = 85;
e.which = 85;
e.keyCode = 85;
$mockTextArea.text("text here");
$mockTextArea[0].selectionStart = 0;
$mockTextArea[0].selectionEnd = 4;
$mockTextArea.trigger(e);
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].selectionEnd = 16;
$mockTextArea.trigger(e);