angular - Test in Karma/Jasmine getModifierState -
how test method (angular):
public detectcapslock(event: keyboardevent): void { let capson: boolean = event.getmodifierstate && event.getmodifierstate("capslock"); if (capson) { this.capson = "caps lock on"; } else { this.capson = ""; } }
Comments
Post a Comment