Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit 477e52d

Browse files
committed
Remove broken Event creator in the controller specs.
Did not add value to the specs, and they broke on PhantomJS versions lower than 2.0.
1 parent 507c6cb commit 477e52d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/uiMentionController.spec.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,9 @@ describe('uiMentionController', () => {
487487
function trigger (el, ev, code) {
488488
let evt;
489489

490-
if (code) {
491-
evt = $document[0].createEvent('KeyboardEvent');
492-
evt.initKeyboardEvent(ev, true, true);
493-
evt.keyCode = code;
494-
} else {
495-
evt = new Event(ev);
496-
}
490+
evt = $document[0].createEvent('KeyboardEvent');
491+
evt.initKeyboardEvent(ev, true, true);
492+
evt.keyCode = code;
497493

498494
el[0].dispatchEvent(evt);
499495

0 commit comments

Comments
 (0)