Loading lib/jsduck/tag/cfg.rb +6 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,12 @@ module JsDuck::Tag :default => true, :optional => true }) # don't parse (required) after subproperties unless tag[:name] =~ /\./ tag[:optional] = false if parse_required(p) end tag[:doc] = :multiline tag end Loading spec/aggregator_required_spec.rb +23 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,27 @@ describe JsDuck::Aggregator do end end describe "a config subproperty labeled with (required)" do before do @doc = parse_member(<<-EOS) /** * @cfg foo Something * @cfg foo.bar (required) Subproperty */ EOS end it "doesn't have the config marked as required" do @doc[:required].should_not == true end it "doesn't have the subproperty marked as required" do @doc[:properties][0][:required].should_not == true end it "contains the (required) inside subproperty description" do @doc[:properties][0][:doc].should == "(required) Subproperty" end end end Loading
lib/jsduck/tag/cfg.rb +6 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,12 @@ module JsDuck::Tag :default => true, :optional => true }) # don't parse (required) after subproperties unless tag[:name] =~ /\./ tag[:optional] = false if parse_required(p) end tag[:doc] = :multiline tag end Loading
spec/aggregator_required_spec.rb +23 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,27 @@ describe JsDuck::Aggregator do end end describe "a config subproperty labeled with (required)" do before do @doc = parse_member(<<-EOS) /** * @cfg foo Something * @cfg foo.bar (required) Subproperty */ EOS end it "doesn't have the config marked as required" do @doc[:required].should_not == true end it "doesn't have the subproperty marked as required" do @doc[:properties][0][:required].should_not == true end it "contains the (required) inside subproperty description" do @doc[:properties][0][:doc].should == "(required) Subproperty" end end end