Skip to content

Commit 7013035

Browse files
test(Resolve): fix resolve test harness
1 parent 83bd52a commit 7013035

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/resolveSpec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Node from "../src/path/node";
1111
import PathFactory from "../src/path/pathFactory";
1212

1313
import {omit, map, pick, prop, extend, forEach} from "../src/common/common"
14+
import {IStateDeclaration} from "../src/state/interface";
1415

1516
let module = angular.mock.module;
1617
///////////////////////////////////////////////
@@ -66,6 +67,7 @@ beforeEach(function () {
6667
thisState.template = thisState.template || "empty";
6768
thisState.name = name;
6869
thisState.parent = parent.name;
70+
thisState.params = {};
6971
thisState.data = { children: [] };
7072

7173
angular.forEach(substates, function (value, key) {
@@ -78,7 +80,7 @@ beforeEach(function () {
7880
});
7981

8082
function makePath(names: string[]): Node[] {
81-
let nodes = <Node[]> map(names, name => new Node(statesMap[name], {}));
83+
let nodes = map(names, name => new Node(statesMap[name]));
8284
return PathFactory.bindTransNodesToPath(nodes);
8385
}
8486

@@ -526,7 +528,7 @@ describe("State transitions with resolves", function() {
526528
}
527529
}
528530

529-
angular.forEach(stateDefs, function(state, key) {
531+
angular.forEach(stateDefs, function(state: IStateDeclaration, key) {
530532
if (!key) return;
531533
state.template = "<div ui-view></div> state"+key;
532534
state.controllerProvider = controllerProvider(state);

0 commit comments

Comments
 (0)