diff --git a/test/fixtures/listenstag.js b/test/fixtures/listenstag.js new file mode 100644 index 00000000..d72f1865 --- /dev/null +++ b/test/fixtures/listenstag.js @@ -0,0 +1,7 @@ +/** An event handler. + * @function + * @listens Foo + * @listens Bar + */ +function handler () { +} diff --git a/test/specs/tags/listenstag.js b/test/specs/tags/listenstag.js index 59cec9c1..51d90d01 100644 --- a/test/specs/tags/listenstag.js +++ b/test/specs/tags/listenstag.js @@ -1,6 +1,6 @@ describe("@listens tag", function() { - var doclet = require('jsdoc/doclet'), - doc = new doclet.Doclet('/** An event handler\n@function handler\n@listens Foo\n@listens Bar */', {}); + var docSet = jasmine.getDocSetFromFile('test/fixtures/listenstag.js'), + doc = docSet.getByLongname('handler')[0]; it("should create a 'listens' property on the doclet, an array, with the events that are listened to", function() { expect(Array.isArray(doc.listens)).toBeTruthy();