8
8
import { normalize } from '@angular-devkit/core' ;
9
9
import { Action , ActionList } from './action' ;
10
10
11
+ type ExpectedAction = jasmine . ObjectContaining < Action > ;
11
12
12
13
describe ( 'Action' , ( ) => {
13
14
describe ( 'optimize' , ( ) => {
@@ -87,7 +88,7 @@ describe('Action', () => {
87
88
actions . optimize ( ) ;
88
89
expect ( actions . length ) . toBe ( 1 ) ;
89
90
expect ( actions . get ( 0 ) ) . toEqual (
90
- jasmine . objectContaining < Action > ( { kind : 'c' , path : normalize ( '/test2' ) } ) ,
91
+ jasmine . objectContaining ( { kind : 'c' , path : normalize ( '/test2' ) } ) as ExpectedAction ,
91
92
) ;
92
93
} ) ;
93
94
@@ -100,14 +101,12 @@ describe('Action', () => {
100
101
101
102
actions . optimize ( ) ;
102
103
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 ) ;
111
110
} ) ;
112
111
} ) ;
113
112
} ) ;
0 commit comments