@@ -56,16 +56,19 @@ export function main() {
5656 describe ( 'Class' , ( ) => {
5757 it ( 'should create a class' , ( ) => {
5858 var i0 , i1 ;
59- var MyClass = Class ( {
60- extends : Class ( {
61- constructor : function ( ) { } ,
62- extendWorks : function ( ) { return 'extend ' + this . arg ; }
63- } ) ,
64- constructor : [ String , function ( arg ) { this . arg = arg ; } ] ,
65- methodA : [ i0 = new Inject ( String ) , [ i1 = Inject ( String ) , Number ] , function ( a , b ) { } ] ,
66- works : function ( ) { return this . arg ; } ,
67- prototype : 'IGNORE'
68- } ) ;
59+ var MyClass =
60+ ( < any > TestDecorator ( 'test-works' ) )
61+ . Class ( {
62+ extends : Class ( {
63+ constructor : function ( ) { } ,
64+ extendWorks : function ( ) { return 'extend ' + this . arg ; }
65+ } ) ,
66+ constructor : [ String , function ( arg ) { this . arg = arg ; } ] ,
67+ methodA :
68+ [ i0 = new Inject ( String ) , [ i1 = Inject ( String ) , Number ] , function ( a , b ) { } ] ,
69+ works : function ( ) { return this . arg ; } ,
70+ prototype : 'IGNORE'
71+ } ) ;
6972 var obj : any = new MyClass ( 'WORKS' ) ;
7073 expect ( obj . arg ) . toEqual ( 'WORKS' ) ;
7174 expect ( obj . works ( ) ) . toEqual ( 'WORKS' ) ;
@@ -76,6 +79,8 @@ export function main() {
7679 var proto = ( < Function > MyClass ) . prototype ;
7780 expect ( proto . extends ) . toEqual ( undefined ) ;
7881 expect ( proto . prototype ) . toEqual ( undefined ) ;
82+
83+ expect ( reflector . annotations ( MyClass ) [ 0 ] . arg ) . toEqual ( 'test-works' )
7984 } ) ;
8085
8186 describe ( 'errors' , ( ) => {
0 commit comments