mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
@author tests - test that you can have multiple authors
This commit is contained in:
parent
2ca61c1beb
commit
cd1fb6c96a
6
test/fixtures/authortag.js
vendored
6
test/fixtures/authortag.js
vendored
@ -2,5 +2,9 @@
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
*/
|
||||
function Thingy() {
|
||||
|
||||
}
|
||||
|
||||
/** @author John Doe <john.doe@gmail.com>
|
||||
* @author Jane Doe <jane.doe@gmail.com> */
|
||||
function Thingy2() {
|
||||
}
|
||||
@ -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 <micmath@gmail.com>');
|
||||
});
|
||||
|
||||
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 <jane.doe@gmail.com>');
|
||||
expect(Thingy2.author).toContain('John Doe <john.doe@gmail.com>');
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user