Navigation Menu

Skip to content

Commit

Permalink
Added extension_for tag tests to builder test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
jordilopez committed Jun 21, 2016
1 parent 2f5f686 commit bf93953
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
9 changes: 9 additions & 0 deletions tests/builder.js
Expand Up @@ -161,6 +161,15 @@ suite.add(new YUITest.TestCase({
Assert.isObject(method.overwritten_from, 'Failed to find overwritten data');
}, item);
},
'test: extension_for': function() {
var item = suite.data.classes['mywidget.SubWidget'];
Assert.isObject(item, 'Failed to parse class');
suite.builder.renderClass(function (html, view, opts) {
var extension_for = opts.meta.extension_for;
Assert.isObject(extension_for, 'Failed to assign extension_for');
Assert.areSame(1, extension_for.length, 'Failed to assign extension_for');
}, item);
},
'test: helper methods': function () {
var item = suite.data.classes['mywidget.SuperWidget'];
Assert.isObject(item, 'Failed to parse class');
Expand Down
29 changes: 15 additions & 14 deletions tests/input/inherit/examplemodule.js
Expand Up @@ -9,10 +9,10 @@

YUI.add('examplemodule', function (Y) {
Y.namespace('mywidget');

/**
* <b>Superclass</b> description.<br>This is a second line too.
*
*
* @constructor
* @class SuperWidget
* @extends Widget
Expand All @@ -23,15 +23,15 @@ YUI.add('examplemodule', function (Y) {
*
*/
Y.mywidget.superwidget = Y.Base.create("mysuperwidget", Y.Widget, [], {

/**
* <b>Supermethod</b> description.<br>This is a second line.
*
*
* @method myMethod
* @async
*/
myMethod: function () {}

/**
* Overwritten method see {{#crossLink "mywidget.SuperWidget"}}{{/crossLink}}
* also see {{#crossLink "mywidget.SuperWidget/myMethod"}}{{/crossLink}}
Expand Down Expand Up @@ -83,36 +83,37 @@ YUI.add('examplemodule', function (Y) {
* Override Event
* @event init2
*/

}, {

});

/**
* Subclass description.
*
*
* @constructor
* @namespace mywidget
* @class SubWidget
* @extends mywidget.SuperWidget
* @extensionfor mywidget.SuperWidget
*/
Y.mywidget.superwidget = Y.Base.create("mysuperwidget", Y.mywidget.superwidget, [], {

/**
* Submethod description.
*
*
* @method myMethod
* @param {boolean} d Foo
*/
myMethod: function () {}

}, {

});

/**
* Subclass description.
*
*
* @constructor
* @namespace mywidget
* @class SubWidget2
Expand Down

0 comments on commit bf93953

Please sign in to comment.