Loading lib/jsduck/class_doc_expander.rb +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ module JsDuck if tagname == :cfg || tagname == :constructor group_name = tagname if tagname == :cfg && tag[:name] !~ /\./ if tagname == :cfg && (tag[:name] !~ /\./ || groups[:cfg].length == 0) groups[:cfg] << [] end end Loading spec/aggregator_classes_spec.rb +16 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,22 @@ describe JsDuck::Aggregator do end end describe "class with parentless sub-cfg" do before do @doc = parse(<<-EOS)["MyClass"] /** * @class MyClass * Comment here. * @cfg {String} foo.one */ EOS end it "detects the one bogus config" do @doc[:members].length.should == 1 end end describe "implicit class with more than one cfg" do before do @doc = parse(<<-EOS)["MyClass"] Loading Loading
lib/jsduck/class_doc_expander.rb +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ module JsDuck if tagname == :cfg || tagname == :constructor group_name = tagname if tagname == :cfg && tag[:name] !~ /\./ if tagname == :cfg && (tag[:name] !~ /\./ || groups[:cfg].length == 0) groups[:cfg] << [] end end Loading
spec/aggregator_classes_spec.rb +16 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,22 @@ describe JsDuck::Aggregator do end end describe "class with parentless sub-cfg" do before do @doc = parse(<<-EOS)["MyClass"] /** * @class MyClass * Comment here. * @cfg {String} foo.one */ EOS end it "detects the one bogus config" do @doc[:members].length.should == 1 end end describe "implicit class with more than one cfg" do before do @doc = parse(<<-EOS)["MyClass"] Loading