From ce7496396f16891e77add76509b8647fb5a88cc2 Mon Sep 17 00:00:00 2001 From: Jasmin Auger Date: Mon, 21 Mar 2016 21:25:58 -0400 Subject: [PATCH] Add tests for angular-mocks' typings. --- angularjs/angular-mocks-tests.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/angularjs/angular-mocks-tests.ts b/angularjs/angular-mocks-tests.ts index 63ea220f6..86bbe6c94 100644 --- a/angularjs/angular-mocks-tests.ts +++ b/angularjs/angular-mocks-tests.ts @@ -87,6 +87,16 @@ logCall = logService.warn; logs = logCall.logs; +/////////////////////////////////////// +// IComponentControllerService +/////////////////////////////////////// +var $componentController: ng.IComponentControllerService; +$componentController<{}, {}>('Test controller', { $scope: {} }); +$componentController<{}, {}>('Test controller', { $scope: {}, test: true }); +$componentController<{}, { test: boolean }>('Test controller', { $scope: {} }, { test: true}); +$componentController<{}, { test?: boolean }>('Test controller', { $scope: {} }, {}); +$componentController<{}, {}>('Test controller', { $scope: {} }, {}, 'identity'); +$componentController<{ cb: () => void }, {}>('Test controller', { $scope: {} }); /////////////////////////////////////// // IHttpBackendService