Skip to content

Commit 91ff8f3

Browse files
test(*): Fix tests
1 parent ef80908 commit 91ff8f3

File tree

5 files changed

+103
-69
lines changed

5 files changed

+103
-69
lines changed

karma.conf.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Karma configuration file
22
var karma = require("karma");
3+
var DEFAULT_NG_VERSION = "1.5";
34

45
/**
56
* This returns a Karma 'files configuration'.
@@ -35,7 +36,7 @@ webpackConfig.plugins = [];
3536
webpackConfig.devtool = 'inline-source-map';
3637

3738
module.exports = function(config) {
38-
var ngVersion = config.ngversion || "1.5";
39+
var ngVersion = config.ngversion || DEFAULT_NG_VERSION;
3940

4041
config.set({
4142
singleRun: true,

test/resolveSpec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ beforeEach(function () {
7575
angular.forEach(substates, function (value, key) {
7676
thisState.data.children.push(loadStates(thisState, value, key));
7777
});
78-
thisState = new State(thisState);
78+
thisState = angular.extend(new State(thisState), { self: thisState });
7979
statesMap[name] = thisState;
8080
return thisState;
8181
}

test/stateEventsSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('UI-Router v0.2.x $state events', function () {
3838
DD = { parent: D, params: { z: {} } },
3939
E = { params: { i: {} } },
4040
F = { resolve: {
41-
delay: function($timeout) { return $timeout(50); }
41+
delay: function($timeout) { return $timeout(angular.noop, 50); }
4242
}};
4343

4444
beforeEach(module(function ($stateProvider, $provide) {

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"allowSyntheticDefaultImports": true,
1010
"outDir": "lib",
1111
"declaration": true,
12-
"sourceMap": true
12+
"sourceMap": true,
13+
"skipLibCheck": true
1314
},
1415
"files": [
1516
"src/index.ts",

0 commit comments

Comments
 (0)