jsdoc/plugins/test/specs/commentConvert.js
Jeff Williams 617b3236bf Replace old, vendored Jasmine with current npm package.
JSDoc-specific test functions are now properties of a `jsdoc` global, not a `jasmine` global.

Also updates license files to reflect the fact that we no longer vendor anything.
2019-05-12 15:10:38 -07:00

21 lines
683 B
JavaScript

/* global jsdoc */
describe('commentConvert plugin', () => {
const env = require('jsdoc/env');
const path = require('jsdoc/path');
let docSet;
const parser = jsdoc.createParser();
const pluginPath = 'plugins/commentConvert';
const pluginPathResolved = path.join(env.dirname, pluginPath);
require('jsdoc/plugins').installPlugins([pluginPathResolved], parser);
docSet = jsdoc.getDocSetFromFile(`${pluginPath}.js`, parser);
it('should convert ///-style comments into jsdoc comments', () => {
const doclet = docSet.getByLongname('module:plugins/commentConvert.handlers.beforeParse');
expect(doclet.length).toEqual(1);
});
});