File tree 3 files changed +27
-0
lines changed
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ var nodeToValue = exports.nodeToValue = function(node) {
134
134
str = nodeToValue ( node . left ) ;
135
135
break ;
136
136
137
+ case Syntax . ClassDeclaration :
138
+ str = nodeToValue ( node . id ) ;
139
+ break ;
140
+
137
141
case Syntax . ExportAllDeclaration :
138
142
// falls through
139
143
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Foo module
3
+ * @module foo
4
+ */
5
+
6
+ /** Class description */
7
+ export class Bar {
8
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ describe ( 'export class' , function ( ) {
4
+ var docSet = jasmine . getDocSetFromFile ( 'test/fixtures/exportclass.js' ) ;
5
+ var bar = docSet . getByLongname ( 'module:foo.Bar' ) [ 0 ] ;
6
+
7
+ it ( 'should name exported classes correctly' , function ( ) {
8
+ expect ( bar ) . toBeDefined ( ) ;
9
+ expect ( bar . name ) . toBe ( 'Bar' ) ;
10
+ } ) ;
11
+
12
+ it ( 'should merge the class description with the doclet for the class' , function ( ) {
13
+ expect ( bar . classdesc ) . toBe ( 'Class description' ) ;
14
+ } ) ;
15
+ } ) ;
You can’t perform that action at this time.
0 commit comments