mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
describe('@externs tag', function() {
|
|
var env = require('jsdoc/env');
|
|
var logger = require('jsdoc/util/logger');
|
|
|
|
var allowUnknownTags = Boolean(env.conf.tags.allowUnknownTags);
|
|
|
|
beforeEach(function() {
|
|
env.conf.tags.allowUnknownTags = false;
|
|
spyOn(logger, 'error');
|
|
});
|
|
|
|
afterEach(function() {
|
|
jasmine.restoreTagDictionary();
|
|
env.conf.tags.allowUnknownTags = allowUnknownTags;
|
|
});
|
|
|
|
describe('JSDoc tags', function() {
|
|
beforeEach(function() {
|
|
jasmine.replaceTagDictionary('jsdoc');
|
|
});
|
|
|
|
it('should not recognize the @externs tag', function() {
|
|
jasmine.getDocSetFromFile('test/fixtures/externstag.js');
|
|
|
|
expect(logger.error).toHaveBeenCalled();
|
|
});
|
|
});
|
|
|
|
describe('Closure Compiler tags', function() {
|
|
beforeEach(function() {
|
|
jasmine.replaceTagDictionary('closure');
|
|
});
|
|
|
|
it('should recognize the @externs tag', function() {
|
|
jasmine.getDocSetFromFile('test/fixtures/externstag.js');
|
|
|
|
expect(logger.error).not.toHaveBeenCalled();
|
|
});
|
|
});
|
|
});
|