Loading lib/jsduck/js_parser.rb +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ module JsDuck match("function") return { :type => :function, :name => look(:ident) ? match(:ident)[:value] : nil, :name => look(:ident) ? match(:ident)[:value] : "", :params => function_parameters, :body => function_body, } Loading spec/aggregator_methods_and_events_spec.rb +14 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,20 @@ describe JsDuck::Aggregator do it_should_behave_like "method documentation" end describe "anonymous function" do before do @doc = parse("/** Some function */ function() {}")[0] end it "detects method" do @doc[:tagname].should == :method end it "detects empty method name" do @doc[:name].should == "" end end describe "explicit @method without @param-s" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/js_parser.rb +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ module JsDuck match("function") return { :type => :function, :name => look(:ident) ? match(:ident)[:value] : nil, :name => look(:ident) ? match(:ident)[:value] : "", :params => function_parameters, :body => function_body, } Loading
spec/aggregator_methods_and_events_spec.rb +14 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,20 @@ describe JsDuck::Aggregator do it_should_behave_like "method documentation" end describe "anonymous function" do before do @doc = parse("/** Some function */ function() {}")[0] end it "detects method" do @doc[:tagname].should == :method end it "detects empty method name" do @doc[:name].should == "" end end describe "explicit @method without @param-s" do before do @doc = parse(<<-EOS)[0] Loading