fix(Compiler): add an error when a directive is null or undefined
fixes #1908
This commit is contained in:
+6
-1
@@ -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() {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user