88import { normalize } from '@angular-devkit/core' ;
99import { Action , ActionList } from './action' ;
1010
11+ type ExpectedAction = jasmine . ObjectContaining < Action > ;
1112
1213describe ( 'Action' , ( ) => {
1314 describe ( 'optimize' , ( ) => {
@@ -87,7 +88,7 @@ describe('Action', () => {
8788 actions . optimize ( ) ;
8889 expect ( actions . length ) . toBe ( 1 ) ;
8990 expect ( actions . get ( 0 ) ) . toEqual (
90- jasmine . objectContaining < Action > ( { kind : 'c' , path : normalize ( '/test2' ) } ) ,
91+ jasmine . objectContaining ( { kind : 'c' , path : normalize ( '/test2' ) } ) as ExpectedAction ,
9192 ) ;
9293 } ) ;
9394
@@ -100,14 +101,12 @@ describe('Action', () => {
100101
101102 actions . optimize ( ) ;
102103 expect ( actions . length ) . toBe ( 2 ) ;
103- expect ( actions . get ( 0 ) ) . toEqual (
104- jasmine . objectContaining < Action > ( {
105- kind : 'r' , path : normalize ( '/test' ) , to : normalize ( '/test2' ) ,
106- } ) ,
107- ) ;
108- expect ( actions . get ( 1 ) ) . toEqual (
109- jasmine . objectContaining < Action > ( { kind : 'o' , path : normalize ( '/test2' ) } ) ,
110- ) ;
104+ expect ( actions . get ( 0 ) ) . toEqual ( jasmine . objectContaining ( {
105+ 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 ) ;
111110 } ) ;
112111 } ) ;
113112} ) ;
0 commit comments