Loading lib/jsduck/merger.rb +2 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,8 @@ module JsDuck elsif code[:type] == :assignment && code[:right] && code[:right][:type] == :ext_extend code[:right][:extend].join(".") elsif code[:type] == :ext_define code[:extend] # Classes defined with Ext.define will automatically inherit from Ext.Base code[:extend] || "Ext.Base" end end Loading spec/aggregator_classes_spec.rb +13 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,19 @@ describe JsDuck::Aggregator do it_should_behave_like "Ext.define" end describe "Ext.define() without extend" do before do @doc = parse(<<-EOS)[0] /** */ Ext.define('MyClass', { }); EOS end it "automatically extends from Ext.Base" do @doc[:extends].should == "Ext.Base" end end describe "class with cfgs" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/merger.rb +2 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,8 @@ module JsDuck elsif code[:type] == :assignment && code[:right] && code[:right][:type] == :ext_extend code[:right][:extend].join(".") elsif code[:type] == :ext_define code[:extend] # Classes defined with Ext.define will automatically inherit from Ext.Base code[:extend] || "Ext.Base" end end Loading
spec/aggregator_classes_spec.rb +13 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,19 @@ describe JsDuck::Aggregator do it_should_behave_like "Ext.define" end describe "Ext.define() without extend" do before do @doc = parse(<<-EOS)[0] /** */ Ext.define('MyClass', { }); EOS end it "automatically extends from Ext.Base" do @doc[:extends].should == "Ext.Base" end end describe "class with cfgs" do before do @doc = parse(<<-EOS)[0] Loading