Fix type declarations for routing configuration test

pull/4040/head
Alex Dik 9 years ago
parent f85938d680
commit b62c28ea3e
  1. 19
      frontend/app/components/routing/routing.configuration.test.ts
  2. 3
      frontend/karma.conf.js

@ -29,22 +29,29 @@
var expect = chai.expect;
describe('Routing', () => {
var $rootScope, $state, mockState = {
var $rootScope: ng.IRootScopeService;
var $state: ng.ui.IStateService;
var mockState = {
go: () => {}
};
beforeEach(angular.mock.module('openproject', ($provide) => {
beforeEach(angular.mock.module('openproject', ($provide: ng.auto.IProvideService) => {
$provide.value('$state', mockState);
}));
beforeEach(inject((_$rootScope_) => {
beforeEach(angular.mock.inject((_$rootScope_: ng.IRootScopeService) => {
$rootScope = _$rootScope_;
}));
describe('when the project id is set', () => {
var toState, toParams,
spy = sinon.spy(mockState, 'go'),
broadcast = () => {
interface CustomStateParams extends ng.ui.IStateParamsService {
projects: string
}
var toState: Object;
var toParams: CustomStateParams;
var spy = sinon.spy(mockState, 'go');
var broadcast = () => {
$rootScope.$broadcast('$stateChangeStart', toState, toParams);
};

@ -101,13 +101,12 @@ module.exports = function(config) {
sourceMap: false,
target: 'ES5',
module: 'commonjs',
noImplicitAny: false,
noImplicitAny: true,
noResolve: true,
removeComments: true,
concatenateOutput: false
},
typings: [
'typings/tsd.d.ts',
'typings/**/*.d.ts'
]
},

Loading…
Cancel
Save