mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
remove scope property from module doclets (#742)
This commit is contained in:
parent
55f40e1085
commit
81d74b9b92
@ -97,7 +97,8 @@ function setModuleScopeMemberOf(doclet) {
|
||||
}
|
||||
|
||||
function setDefaultScope(doclet) {
|
||||
if (!doclet.scope) {
|
||||
// module doclets don't get a default scope
|
||||
if (!doclet.scope && doclet.kind !== 'module') {
|
||||
doclet.setScope('global');
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,12 +26,16 @@ describe('@module tag', function() {
|
||||
var blend = docSet.getByLongname('module:color/mixer.blend')[0];
|
||||
var darken = docSet.getByLongname('module:color/mixer.darken')[0];
|
||||
|
||||
it('When a @module tag defines a module module, a symbol of kind "module" is documented', function() {
|
||||
it('When a @module tag defines a module, a symbol of kind "module" is documented', function() {
|
||||
expect(typeof mixer).toBe('object');
|
||||
expect(mixer.kind).toBe('module');
|
||||
});
|
||||
|
||||
it('When an object literal is lent to a module with a @lends tag, A member of that object literal is documented as a member of the module', function() {
|
||||
it('When a @module tag defines a module, the module doclet does not have a "scope" property', function() {
|
||||
expect(mixer.scope).not.toBeDefined();
|
||||
});
|
||||
|
||||
it('When an object literal is lent to a module with a @lends tag, a member of that object literal is documented as a member of the module', function() {
|
||||
expect(typeof blend).toBe('object');
|
||||
expect(blend.kind).toBe('function');
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user