chore(di): moved tests to typescript

This commit is contained in:
vsavkin
2015-05-22 15:39:28 -07:00
parent d27e5512c0
commit df59e969cf
9 changed files with 339 additions and 389 deletions

View File

@ -1,6 +1,6 @@
import {Type} from 'angular2/src/facade/lang';
export interface ForwardRefFn { (): Type; }
export interface ForwardRefFn { (): any; }
/**
* Allows to refer to references which are not yet defined.

View File

@ -21,7 +21,7 @@ export var afterEach = _global.afterEach;
export interface NgMatchers extends jasmine.Matchers {
toBe(expected: any): boolean;
toEqual(expected: any): boolean;
toBePromise(expected: any): boolean;
toBePromise(): boolean;
toBeAnInstanceOf(expected: any): boolean;
toHaveText(expected: any): boolean;
toImplement(expected: any): boolean;

View File

@ -9,6 +9,7 @@ export function makeDecorator(annotationCls) {
var annotationInstance = Object.create(annotationCls.prototype);
annotationCls.apply(annotationInstance, args);
return function(cls) {
var annotations = Reflect.getMetadata('annotations', cls);
annotations = annotations || [];
annotations.push(annotationInstance);