jsdoc/plugins/test/specs/railsTemplate.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

18 lines
682 B
JavaScript

/* global jsdoc */
describe('railsTemplate plugin', () => {
const env = require('jsdoc/env');
const path = require('jsdoc/path');
const parser = jsdoc.createParser();
const pluginPath = path.join(env.dirname, 'plugins/railsTemplate');
require('jsdoc/plugins').installPlugins([pluginPath], parser);
require('jsdoc/src/handlers').attachTo(parser);
it('should remove <% %> rails template tags from the source of *.erb files', () => {
const docSet = parser.parse([path.join(env.dirname, 'plugins/test/fixtures/railsTemplate.js.erb')]);
expect(docSet[2].description).toEqual('Remove rails tags from the source input (e.g. )');
});
});