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