@@ -29,10 +29,10 @@ describe('Terminal', () => {
2929 beforeEach ( ( ) => {
3030 term = new TestTerminal ( termOptions ) ;
3131 term . refresh = ( ) => { } ;
32- ( < any > term ) . renderer = new MockRenderer ( ) ;
32+ ( term as any ) . renderer = new MockRenderer ( ) ;
3333 term . viewport = new MockViewport ( ) ;
34- ( < any > term ) . _compositionHelper = new MockCompositionHelper ( ) ;
35- ( < any > term ) . element = {
34+ ( term as any ) . _compositionHelper = new MockCompositionHelper ( ) ;
35+ ( term as any ) . element = {
3636 classList : {
3737 toggle : ( ) => { } ,
3838 remove : ( ) => { }
@@ -86,12 +86,12 @@ describe('Terminal', () => {
8686 assert . equal ( e . domEvent instanceof Object , true ) ;
8787 done ( ) ;
8888 } ) ;
89- const evKeyPress = < KeyboardEvent > {
89+ const evKeyPress = {
9090 preventDefault : ( ) => { } ,
9191 stopPropagation : ( ) => { } ,
9292 type : 'keypress' ,
9393 keyCode : 13
94- } ;
94+ } as KeyboardEvent ;
9595 term . keyPress ( evKeyPress ) ;
9696 } ) ;
9797 it ( 'should fire a key event after a keydown DOM event' , ( done ) => {
@@ -100,13 +100,13 @@ describe('Terminal', () => {
100100 assert . equal ( e . domEvent instanceof Object , true ) ;
101101 done ( ) ;
102102 } ) ;
103- ( < any > term ) . textarea = { value : '' } ;
104- const evKeyDown = < KeyboardEvent > {
103+ ( term as any ) . textarea = { value : '' } ;
104+ const evKeyDown = {
105105 preventDefault : ( ) => { } ,
106106 stopPropagation : ( ) => { } ,
107107 type : 'keydown' ,
108108 keyCode : 13
109- } ;
109+ } as KeyboardEvent ;
110110 term . keyDown ( evKeyDown ) ;
111111 } ) ;
112112 it ( 'should fire the onResize event' , ( done ) => {
@@ -140,18 +140,18 @@ describe('Terminal', () => {
140140 } ) ;
141141
142142 describe ( 'attachCustomKeyEventHandler' , ( ) => {
143- const evKeyDown = < KeyboardEvent > {
143+ const evKeyDown = {
144144 preventDefault : ( ) => { } ,
145145 stopPropagation : ( ) => { } ,
146146 type : 'keydown' ,
147147 keyCode : 77
148- } ;
149- const evKeyPress = < KeyboardEvent > {
148+ } as KeyboardEvent ;
149+ const evKeyPress = {
150150 preventDefault : ( ) => { } ,
151151 stopPropagation : ( ) => { } ,
152152 type : 'keypress' ,
153153 keyCode : 77
154- } ;
154+ } as KeyboardEvent ;
155155
156156 beforeEach ( ( ) => {
157157 term . clearSelection = ( ) => { } ;
@@ -374,13 +374,13 @@ describe('Terminal', () => {
374374
375375 describe ( 'keyPress' , ( ) => {
376376 it ( 'should scroll down, when a key is pressed and terminal is scrolled up' , ( ) => {
377- const event = < KeyboardEvent > {
377+ const event = {
378378 type : 'keydown' ,
379379 key : 'a' ,
380380 keyCode : 65 ,
381381 preventDefault : ( ) => { } ,
382382 stopPropagation : ( ) => { }
383- } ;
383+ } as KeyboardEvent ;
384384
385385 term . buffer . ydisp = 0 ;
386386 term . buffer . ybase = 40 ;
@@ -403,7 +403,7 @@ describe('Terminal', () => {
403403 assert . equal ( term . buffer . ydisp , startYDisp ) ;
404404 term . scrollLines ( - 1 ) ;
405405 assert . equal ( term . buffer . ydisp , startYDisp - 1 ) ;
406- term . keyPress ( < KeyboardEvent > { keyCode : 0 } ) ;
406+ term . keyPress ( { keyCode : 0 } ) ;
407407 assert . equal ( term . buffer . ydisp , startYDisp - 1 ) ;
408408 } ) ;
409409 } ) ;
0 commit comments