mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
commit
d2529644b6
@ -43,9 +43,9 @@ function TagValueRequiredError(tagName, meta) {
|
||||
}
|
||||
TagValueRequiredError.prototype = Error.prototype;
|
||||
|
||||
function TagValueNotPermittedError(tagName, message, meta) {
|
||||
function TagValueNotPermittedError(tagName, meta) {
|
||||
this.name = 'TagValueNotPermittedError';
|
||||
this.message = 'The @' + tagName + ' tag does not permit a value: "' + message + '". File: ' + meta.filename + ', Line: ' + meta.lineno + '\n' + meta.comment;
|
||||
this.message = 'The @' + tagName + ' tag does not permit a value. File: ' + meta.filename + ', Line: ' + meta.lineno + '\n' + meta.comment;
|
||||
}
|
||||
TagValueNotPermittedError.prototype = Error.prototype;
|
||||
|
||||
|
||||
6
test/cases/ignoretag2.js
Normal file
6
test/cases/ignoretag2.js
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
@ignore value that shouldn't be here
|
||||
*/
|
||||
function foo(x) {
|
||||
|
||||
}
|
||||
@ -6,4 +6,12 @@
|
||||
assert.equal(foo.ignore, true);
|
||||
});
|
||||
|
||||
try {
|
||||
docSet = testhelpers.getDocSetFromFile('test/cases/ignoretag2.js');
|
||||
foo = docSet.getByLongname('foo')[0];
|
||||
} catch (e) {
|
||||
test('When a symbol has an @ignore tag with a value an error is thrown', function() {
|
||||
assert.equal(e.name, 'TagValueNotPermittedError');
|
||||
});
|
||||
}
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user