@@ -6,14 +6,14 @@ declare var inject;
6
6
import Spy = jasmine . Spy ;
7
7
import "./util/matchers" ;
8
8
import { resolvedValue , resolvedError , caught } from './util/testUtilsNg1' ;
9
- import { ResolveContext , State , PathNode , omit , pick , inherit , forEach } from "ui-router-core" ;
9
+ import { ResolveContext , StateObject , PathNode , omit , pick , inherit , forEach } from "ui-router-core" ;
10
10
import { UIRouter , Resolvable , services , StateDeclaration } from "ui-router-core" ;
11
11
import "../src/legacy/resolveService" ;
12
12
13
13
let module = angular [ 'mock' ] . module ;
14
14
///////////////////////////////////////////////
15
15
16
- var states , statesTree , statesMap : { [ key :string ] : State } = { } ;
16
+ var states , statesTree , statesMap : { [ key :string ] : StateObject } = { } ;
17
17
var emptyPath ;
18
18
var vals , counts , expectCounts ;
19
19
var asyncCount ;
@@ -75,7 +75,7 @@ beforeEach(function () {
75
75
angular . forEach ( substates , function ( value , key ) {
76
76
thisState . data . children . push ( loadStates ( thisState , value , key ) ) ;
77
77
} ) ;
78
- thisState = angular . extend ( new State ( thisState ) , { self : thisState } ) ;
78
+ thisState = StateObject . create ( thisState ) ;
79
79
statesMap [ name ] = thisState ;
80
80
return thisState ;
81
81
}
@@ -444,7 +444,7 @@ describe("Integration: Resolvables system", () => {
444
444
copy [ name ] = stateDef ;
445
445
} ) ;
446
446
447
- angular . forEach ( copy , ( stateDef : State ) => {
447
+ angular . forEach ( copy , ( stateDef : StateObject ) => {
448
448
if ( stateDef . name ) $stateProvider . state ( stateDef . self ) ;
449
449
} ) ;
450
450
} ) ) ;
0 commit comments