@@ -22,10 +22,10 @@ import {
2222 mockDynamicFormValidationService
2323} from '../../../../../testing/dynamic-form-mock-services' ;
2424
25- function createKeyUpEvent ( key : number ) {
25+ function createKeyUpEvent ( key : string ) {
2626 /* eslint-disable no-empty,@typescript-eslint/no-empty-function */
2727 const event = {
28- keyCode : key , preventDefault : ( ) => {
28+ key : key , preventDefault : ( ) => {
2929 } , stopPropagation : ( ) => {
3030 }
3131 } ;
@@ -256,8 +256,8 @@ describe('DsDynamicTagComponent test suite', () => {
256256 expect ( tagComp . chips . getChipsItems ( ) ) . toEqual ( chips . getChipsItems ( ) ) ;
257257 } ) ;
258258
259- it ( 'should add an item on ENTER or key press is \',\' or \';\' ' , fakeAsync ( ( ) => {
260- let event = createKeyUpEvent ( 13 ) ;
259+ it ( 'should add an item on ENTER or key press is \',\'' , fakeAsync ( ( ) => {
260+ let event = createKeyUpEvent ( 'Enter' ) ;
261261 tagComp . currentValue = 'test value' ;
262262
263263 tagFixture . detectChanges ( ) ;
@@ -268,7 +268,7 @@ describe('DsDynamicTagComponent test suite', () => {
268268 expect ( tagComp . model . value ) . toEqual ( [ 'test value' ] ) ;
269269 expect ( tagComp . currentValue ) . toBeNull ( ) ;
270270
271- event = createKeyUpEvent ( 188 ) ;
271+ event = createKeyUpEvent ( ',' ) ;
272272 tagComp . currentValue = 'test value' ;
273273
274274 tagFixture . detectChanges ( ) ;
0 commit comments