diff --git a/test/fixtures/exportstag5.js b/test/fixtures/exportstag5.js new file mode 100644 index 00000000..b2c5fc8e --- /dev/null +++ b/test/fixtures/exportstag5.js @@ -0,0 +1,13 @@ +define(function() { + 'use strict'; + var bar = function() {}; + /** @exports Foo */ + var Foo = Object.create( + /** @lends module:Foo.prototype */ + { + /** This should be in the Foo module doc. */ + bar : function() {} + } + ); + return Foo; +}); diff --git a/test/specs/tags/exportstag.js b/test/specs/tags/exportstag.js index 6d422754..c1e06a04 100644 --- a/test/specs/tags/exportstag.js +++ b/test/specs/tags/exportstag.js @@ -1,3 +1,4 @@ +/*global describe: true, expect: true, it: true, jasmine: true */ describe("@exports tag", function() { describe("object literals", function() { @@ -86,4 +87,13 @@ describe("@exports tag", function() { //expect(inhead.memberof, 'module:html/utils'); }); }); -}); \ No newline at end of file + + describe('variable shadowing', function() { + var docSet = jasmine.getDocSetFromFile('test/fixtures/exportstag5.js'); + var method = docSet.getByLongname('module:Foo#bar')[0]; + + it('A variable defined in an inner scope should correctly shadow a variable in an outer scope.', function() { + expect(method.description).toBe('This should be in the Foo module doc.'); + }); + }); +});