Skip to content

Commit

Permalink
Exposed angular.mock.module.sharedInjector method for jasmine and moc…
Browse files Browse the repository at this point in the history
…ha testing to take advantage of jasmine's beforeAll() and mocha's before() methods. (#9106)
  • Loading branch information
AlStar01 authored and vvakame committed Apr 25, 2016
1 parent d0fb1d7 commit 5b72570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions angularjs/angular-mocks-tests.ts
Expand Up @@ -36,6 +36,7 @@ mock.module(
function () { return 2; }
);
mock.module({ module1: function () { return 1; } });
mock.module.sharedInjector();

date = mock.TzDate(-7, '2013-1-1T15:00:00Z');
date = mock.TzDate(-8, 12345678);
Expand Down
5 changes: 4 additions & 1 deletion angularjs/angular-mocks.d.ts
Expand Up @@ -47,7 +47,10 @@ declare namespace angular {
inject: IInjectStatic

// see https://docs.angularjs.org/api/ngMock/function/angular.mock.module
module(...modules: any[]): any;
module: {
(...modules: any[]): any;
sharedInjector(): void;
}

// see https://docs.angularjs.org/api/ngMock/type/angular.mock.TzDate
TzDate(offset: number, timestamp: number): Date;
Expand Down

0 comments on commit 5b72570

Please sign in to comment.