fix(Compiler): add an error when a directive is null or undefined

fixes #1908
This commit is contained in:
Victor Berchet
2015-05-15 10:16:04 +02:00
parent 666336be1a
commit 25cd6e4321
3 changed files with 82 additions and 12 deletions
+6 -1
View File
@@ -121,6 +121,11 @@ export function main() {
reflector.registerType(TestObj, {"annotations" : [1,2]});
expect(reflector.annotations(TestObj)).toEqual([1,2]);
});
it("should work for a clas without annotations", () => {
var p = reflector.annotations(ClassWithoutAnnotations);
expect(p).toEqual([]);
});
});
describe("getter", () => {
@@ -165,4 +170,4 @@ export function main() {
});
});
});
}
}