diff --git a/test/fixtures/authortag.js b/test/fixtures/authortag.js index 155bb570..3bba0f0f 100644 --- a/test/fixtures/authortag.js +++ b/test/fixtures/authortag.js @@ -2,5 +2,9 @@ @author Michael Mathews */ function Thingy() { - -} \ No newline at end of file +} + +/** @author John Doe + * @author Jane Doe */ +function Thingy2() { +} diff --git a/test/specs/tags/authortag.js b/test/specs/tags/authortag.js index 42ca0cc6..1a84b336 100644 --- a/test/specs/tags/authortag.js +++ b/test/specs/tags/authortag.js @@ -1,8 +1,18 @@ describe("@author tag", function() { var docSet = jasmine.getDocSetFromFile('test/fixtures/authortag.js'), - Thingy = docSet.getByLongname('Thingy')[0]; + Thingy = docSet.getByLongname('Thingy')[0], + Thingy2 = docSet.getByLongname('Thingy2')[0]; it('When a symbol has a @author tag, the doclet has a author property with that value.', function() { + expect(Thingy.author).toBeDefined(); + expect(Array.isArray(Thingy.author)).toBe(true); expect(Thingy.author[0]).toBe('Michael Mathews '); }); -}); \ No newline at end of file + + it('When a symbol has multiple @author tags, the doclet has a author property, an array with those values.', function() { + expect(Thingy2.author).toBeDefined(); + expect(Array.isArray(Thingy2.author)).toBe(true); + expect(Thingy2.author).toContain('Jane Doe '); + expect(Thingy2.author).toContain('John Doe '); + }); +});