88import { normalize } from '@angular-devkit/core' ;
99import { Action , ActionList } from './action' ;
1010
11- type ExpectedAction = jasmine . ObjectContaining < Action > ;
12-
1311describe ( 'Action' , ( ) => {
1412 describe ( 'optimize' , ( ) => {
1513 it ( 'works with create' , ( ) => {
@@ -88,7 +86,7 @@ describe('Action', () => {
8886 actions . optimize ( ) ;
8987 expect ( actions . length ) . toBe ( 1 ) ;
9088 expect ( actions . get ( 0 ) ) . toEqual (
91- jasmine . objectContaining ( { kind : 'c' , path : normalize ( '/test2' ) } ) as ExpectedAction ,
89+ jasmine . objectContaining < Action > ( { kind : 'c' , path : normalize ( '/test2' ) } ) ,
9290 ) ;
9391 } ) ;
9492
@@ -101,12 +99,12 @@ describe('Action', () => {
10199
102100 actions . optimize ( ) ;
103101 expect ( actions . length ) . toBe ( 2 ) ;
104- expect ( actions . get ( 0 ) ) . toEqual ( jasmine . objectContaining ( {
102+ expect ( actions . get ( 0 ) ) . toEqual ( jasmine . objectContaining < Action > ( {
105103 kind : 'r' , path : normalize ( '/test' ) , to : normalize ( '/test2' ) ,
106- } ) as ExpectedAction ) ;
107- expect ( actions . get ( 1 ) ) . toEqual ( jasmine . objectContaining ( {
108- kind : 'o' , path : normalize ( '/test2' ) ,
109- } ) as ExpectedAction ) ;
104+ } ) ) ;
105+ expect ( actions . get ( 1 ) ) . toEqual (
106+ jasmine . objectContaining < Action > ( { kind : 'o' , path : normalize ( '/test2' ) } ) ,
107+ ) ;
110108 } ) ;
111109 } ) ;
112110} ) ;
0 commit comments