Skip to content

Commit e8831e7

Browse files
authored
test(parse): Improve test coverage of glob and doc parsing (#637)
1 parent cb8fdfa commit e8831e7

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Diff for: test/bin.js

+8
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ test('external modules option', function (t) {
139139
});
140140
});
141141

142+
test('when a file is specified both in a glob and explicitly, it is only documented once', function (t) {
143+
documentation(['build fixture/simple.input.js fixture/simple.input.*'], function (err, data) {
144+
t.ifError(err);
145+
t.equal(data.length, 1, 'File is documented only once');
146+
t.end();
147+
});
148+
});
149+
142150
test('extension option', function (t) {
143151
documentation(['build fixture/extension/index.otherextension ' +
144152
'--requireExtension=otherextension --parseExtension=otherextension'], function (err, data) {

Diff for: test/lib/parse.js

+20
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,26 @@ test('parse - @augments', function (t) {
8282
t.end();
8383
});
8484

85+
/*
86+
* Dossier-style augments tag
87+
* https://github.com/google/closure-library/issues/746
88+
*/
89+
test('parse - @augments in dossier style', function (t) {
90+
t.equal(evaluate(function () {
91+
/** @augments {Foo} */
92+
})[0].augments[0].name, 'Foo', 'augments');
93+
94+
t.end();
95+
});
96+
97+
test('parse - @augments of complex passes through', function (t) {
98+
t.deepEqual(evaluate(function () {
99+
/** @augments {function()} */
100+
})[0].augments, []);
101+
102+
t.end();
103+
});
104+
85105
test('parse - @author', function (t) {
86106
t.end();
87107
});

0 commit comments

Comments
 (0)